I\'ve written some integration tests that I\'d like to run against a copy of my prod database before I push to production. This lets me test all of my routes are still corre
To get this to work I had to specifiy the environment when calling the rake task, otherwise it would run the migrations on the development db and then run the tests on the test db; given the example from above
namespace :dbtest do
Rake::TestTask.new(:integration => "db:migrate") do |t|
...
I had to execute the tests like so
rake environment RAILS_ENV=test dbtest:integration