On 8 October 2010 13:22, Marnen Laibow-Koser <[email protected]> wrote: > Alex wrote: >> With Rails 2.3.x there was a rake task "rake db:test:clone" that I >> used to use all the time in order to clone the development DB for use >> with testing. >> >> However I can't seem to find that test with Rails 3.0. How is >> everyone bootstrapping their test database etc. for testing? > > 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.
I did not think that rake db:test:clone cloned the db contents, I thought it was just the structure, that is certainly what happened when I tried it (expecting it to clone the data). Though what the difference is between db:test:clone, db:test:clone_structure and db:test:prepare I am not sure. If I am right then I think the OP is asking how to create his test db in Rails 3, in other words the equivalent of db:test:prepare. Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

