Is there any difference between Factory(:some_factory) and FactoryGirl.create(:some_factory)?
Factory(:some_factory) was causing ActiveRecord::AssociationTypeMismatch in one controller spec while FactoryGirl.create(:some_factory) was not causing it
Factory(:some_factory) and Factory.create(:some_factory) were used in older versions of FactoryGirl but deprecated in favor of the current FactoryGirl.create(:some_factory) syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With