On Fri, Oct 17, 2008 at 3:42 PM, Stephen Eley <[EMAIL PROTECTED]> wrote: > On Fri, Oct 17, 2008 at 2:46 PM, Rasmus Rasmussen <[EMAIL PROTECTED]> wrote: >> >> Something got messed up when I changed a table's name from 'works' to >> 'work_periods'. Now the fixture:load thing does not work. Obviously the >> old table is still in there in some file. > > Dumb question, but did you clone or re-migrate your test database > after you made this change? > > This trips me up all the time. I'll do something clever with the > database, run db:migrate, and totally forget that that doesn't update > the test environment, just development. Then my specs fail and I > freak out.
I use this command line alias after I write a migration: alias tmig='rake db:migrate && rake db:rollback && rake db:migrate && rake db:test:prepare' It makes sure that I can migrate up and down for the migration I just wrote, and it will make sure the test database is prepared. Zach > > > -- > Have Fun, > Steve Eley ([EMAIL PROTECTED]) > ESCAPE POD - The Science Fiction Podcast Magazine > http://www.escapepod.org > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users