I’m developing a Rails application with Rspec for unit testing.
Weeks ago, Rspec used to migrate the database to the last version automatically when executing ‘rake spec’, but now it doesn’t do it automatically, I have to implement everything for myself.
This happens in test environment, because my development data doesn’t desappear.
Is my fault? I didn’t change anything, I think 🙂
Typically what I do is use an alias command that runs both migrate and prepares the test database.
In your .bashrc just create an alias command like so and then run migrate_databases whenever you need to.