Phoenix Rising wrote in post #970881:
> Hey guys,
>
> I've been practicing TDD on my rails apps for a while now, and I'm
> constantly plagued by factory girl and its association support. It
> really irks me to see that a test failed because object A calls
> a.association ... on object B which calls b.association on ... which
> tries to instantiate a duplicate of object C, which already exists,
> and so its uniqueness validations fail, causing the whole chain of the
> test to explode.
Then your factories are set up incorrectly. This should not be
happening. Let's see some factory code that is giving you trouble.
>
> I've been chasing this damn chicken-or-the-egg problem for a while,
> but ultimately I'm wondering if it's time to scrap factory girl and
> look at something else.
Doesn't sound like a Factory Girl problem.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment