On Nov 04, 2008, at 10:15 pm, Mark Wilden wrote:
I think it's actually simpler to do 'rake db:test:prepare' rather than migrate the test database. Migrations can be a pain when you've only got one database to worry about, much less two. The db:test:prepare task extracts the schema from the development database, drops the test database, then builds it again with the schema script. One reason I like it is that I know for sure that my tests are starting from a known state - empty. The other is that I know for sure that the test db matches the dev db.
Except, this doesn't work if your migrations contain seed data, eg lookup tables. In which case you have to compensate for this in your spec setups, which is a risky DRY violation. It's safer to get your test db into shape the same way you get your production one.
Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/ _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
