Saturday, October 9, 2010

[Rails] Re: bootstrapping test database?

Robert Pankowecki wrote:
> On Oct 8, 2:22�pm, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
>
>> You don't want to do that. �Start from a blank DB, and in each test, use
>> factories to create only the records you need for that test. �That way
>> it is clearer what is being tested.
>
> Except for the dictionaries tables. I changed the rake tasks so
> development and test database are both seeded.
>

No. Even dictionaries should not be seeded in test. Just use factories
to create only the actual records needed for each individual test.

As far as I can tell, there is no valid use case for seeding the test
DB. Don't ever do it.

> Robert Pankowecki

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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate