title: Error in Factory_girl: NoMethodError: undefined method - rspec and rails 3.1.0
body: <p>I am having a problem with factory_girl. Here is the error with rspec.</p>
  
  <p>"Failure/Error: customer = Factory(:customer, :name => nil)
  NoMethodError:
  undefined method `category1_id=' for #Customer:0x4175418"</p>
  
  <p>Here is the rspec code:</p>
  
  <pre><code>describe "data integrity" do
    it "should return error with no name" do
      customer = Factory(:customer, :name =&gt; nil)
      customer.errors[:name].should_not be_empty
      customer.should_not be_valid
    end
    it "should take a good name" do
      customer = Factory(:customer, :name =&gt; "good customer name")
      customer.errors[:name].should be_empty
    end
  end
  </code></pre>
  
  <p>category1_id is a column in customer table. Here is the customer.rb</p>
  
  <pre><code>class Customer &lt; ActiveRecord::Base
    validates :name, :presence =&gt; true
  end
  </code></pre>
  
  <p>The definition for Factory(:customer)</p>
  
  <pre><code>Factory.define :customer do |c|
    c.name "test customer"
    c.email "t@acom.com"
    c.phone "12345678"
    c.cell "1234567890"
    c.active 1
    c.category1_id 2
    c.short_name "test" 
  end
  </code></pre>
  
  <p>Any thoughts? thanks.</p>