title: Association with FactoryGirl throws undefined method
body: <p>I've got an activity which belongs to many activities. Whenever I test my factory with rSpec I get an error.</p>
  
  <p>My <strong>Test</strong> is:</p>
  
  <pre><code>it "has valid factory" do
      expect(FactoryGirl.build(:activity)).to be_valid
  end
  </code></pre>
  
  <p>And the <strong>error</strong> given is:</p>
  
  <pre><code>  1) Activity has valid factory
       Failure/Error: expect(FactoryGirl.build(:activity)).to be_valid
       NoMethodError:
         undefined method `client=' for #&lt;Activity:0x6cbb800&gt;
       # C:in `object'
       # ./spec/models/activity_spec.rb:5:in `block (2 levels) in &lt;top (required)&gt;
  </code></pre>
  
  <p>It's been like this since I've added <code>association :client</code> to my <strong>activities factory</strong>:</p>
  
  <pre><code>FactoryGirl.define do
      factory :activity do
          title "Activity"
          start_date {Date.parse('2013-05-13 12:00:00')}
          end_date {Date.parse('2013-05-13 12:15:00')}
          pictogram_id "1"
          association :client
      end
  end
  </code></pre>
  
  <p>And the client on itself passes all tests aswell. With the same factory: (<strong>clients.rb</strong>)</p>
  
  <pre><code>FactoryGirl.define do
      factory :client do
          name "Client name"
          background "#FFFFFF"
          birthdate {15.years.ago}
      end
  end
  </code></pre>
  
  <p>Since it's not a test DB prepare/clone problem I'm updating the post with the relevant part of my <strong>schema.rb</strong></p>
  
  <pre><code>  create_table "activities", force: true do |t|
      t.string   "title"
      t.datetime "start_date"
      t.datetime "end_date"
      t.integer  "pictogram_id"
      t.datetime "created_at"
      t.datetime "updated_at"
    end
  
    add_index "activities", ["pictogram_id"], name: "index_activities_on_pictogram_id"
  
    create_table "activities_clients", id: false, force: true do |t|
      t.integer "activity_id"
      t.integer "client_id"
    end
  
    add_index "activities_clients", ["activity_id"], name: "index_activities_clients_on_activity_id"
    add_index "activities_clients", ["client_id"], name: "index_activities_clients_on_client_id"
  
    create_table "clients", force: true do |t|
      t.string   "name"
      t.string   "avatar"
      t.date     "birthdate"
      t.string   "background"
      t.integer  "group_id"
      t.datetime "created_at"
      t.datetime "updated_at"
    end
  </code></pre>
  
  <p>Any idea why the association fails to ehm.. associate?</p>