I'm investigating moving from fixtures to generated data (using
Machinist right now, though this question is probably generic to
any generator) but I seem to be missing one essential point:

If I use a fixture, I can test that e.g.

-  an object will be valid with a valid owner (user) id
-  an object can't be valid with a nil owner id
-  an object can't be valid with a non-existent/invalid owner id

because I know what owner ids exist (and thus which don't exist).

If I use a generator to create test objects and owners, I have no
idea what owner ids have been created, so how can I specify an
invalid one for test purposes?

Or am I completely off-track in some way? TIA!

-- 
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
twitter: @hassan

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to