However, when the build-in Clearance tests (or my own) call
Factory.attributes_for(:user), the twitter_account attribute is set to
nil. (If I do Factory(:user), the twitter_account is set up
properly.) Is there any way to make attributes_for include the
associated object?
melvin ram
unread,
Mar 13, 2009, 10:45:22 PM3/13/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to factory_girl
Have you though of using Factory.build instead of .attributes_for? I
think the attributes_for is just for getting the attributes... not the
associated objects
John Moody
unread,
Mar 14, 2009, 12:23:42 AM3/14/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to factory_girl
It has to be attributes_for, as it's part of a functional test - the
attributes are sent as part of a POST.
Robert Wahler
unread,
Mar 26, 2009, 5:30:28 PM3/26/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message