On Tue, Nov 4, 2008 at 1:10 PM, Fernando Perez <[EMAIL PROTECTED]> wrote:
> Thanks Ashley. And I am sure I will forget to run migration for the test > environment each time I make changes to it. I will create a dumb script > that looks like: > -- > RAILS_ENV=production rake db:migrate > RAILS_ENV=test rake db:migrate > 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. ///ark
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
