I don't know if this is a bug with FactoryGirl or if it is something i am doing wrong
I have two factory definitions
factory :employee do
name "name1"
association :department
end
factory :department do
name "department1"
end
I would expect the following to build both employee and department
FactoryGirl.build(:employee, :name => "employee")
But it builds the employee object and creates department in the database. I am sure it use to work in some older versions of FactoryGirl.
I am using factory_girl version 4.2.0.
How do i make it build the associated objects instead of creating one?