Factory(:some_fact) is causing ActiveRecord::AssociationTypeMismatch while FactoryGirl.create(:some_fact) is not causing it

28 views
Skip to first unread message

Tsvetelina Borisova

unread,
Feb 15, 2013, 6:48:03 AM2/15/13
to factor...@googlegroups.com
Can you help me and tell me why? 

Josh Clayton

unread,
Feb 15, 2013, 8:58:10 AM2/15/13
to factor...@googlegroups.com
Can you post the code calling the factory, your factories file, and the full backtrace?

Tsvetelina Borisova

unread,
Feb 15, 2013, 9:36:45 AM2/15/13
to factor...@googlegroups.com
there are too many specs - more than 900 and I track the line where all errors happen:

Factory(:user) - apparently this creates and updates the user though in the update nothing is changed. 

Josh Clayton

unread,
Feb 15, 2013, 9:40:34 AM2/15/13
to factor...@googlegroups.com
This is likely because of an error with how you're assigning an association. I can't really provide more insight without seeing the code and the backtrace, though.
Reply all
Reply to author
Forward
0 new messages