Steve Ross wrote:
> On Jan 29, 2010, at 11:22 AM, kkohrt wrote:
>> 
>> Is there any way I can require a small set of data be in the test
>> database before any tests are run? (unit, functional, integration,
>> cucumber, etc)
>> Any way besides using fixtures, that is.
>> Overload a rake task?
>> Modify test_helper?
>> Any ideas?
>> (Simple Case: I have to have a minimal set of user roles defined
>> before any users can be created)
> 
> 
> I use fixture replacements such as Fixjour or machinist. So,
> 
> 1.upto(10) do
>   Model.make  # Machinist
> end
> 
> That sort of thing. It's good to put in a setup step.

Yes, factories are generally the best solution.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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-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