title: How to get a simple test to run with rspec + fabrication?
body: <p>I'm trying to get a simple test up and running with rspec + fabrication. Unfortunately, not too many decent articles on this.</p>
  
  <p>In spec/model/event_spec.rb</p>
  
  <pre><code>require 'spec_helper'
  
  describe Event do
    subject { Fabricate(:event) }
  
    describe "#full_name" do
      its(:city) { should == "LA" }
    end
  
  end
  </code></pre>
  
  <p>In spec/fabricators/event_fabricator.rb</p>
  
  <pre><code>Fabricator(:event) do
    user { Fabricate(:user) }
  
    # The test works if I uncomment this line:
    # user_id 1
  
    city "LA"
    description "Best event evar"
  end
  </code></pre>
  
  <p>In spec/fabricators/user_fabricator.rb</p>
  
  <pre><code>Fabricator(:user) do
    name 'Foobar'
    email { Faker::Internet.email }
  end
  </code></pre>
  
  <p>I keep getting:</p>
  
  <pre><code> 1) Event#full_name city 
       Failure/Error: subject { Fabricate(:event) }
       ActiveRecord::RecordInvalid:
         Validation failed: User can't be blank
  </code></pre>
  
  <p><strong>PS</strong> if anyone knows of any online articles / tutorials worth a read on getting started with rspec and fabrication. Do let me know</p>