Closed GBH closed 13 years ago
Hrm, maybe just don't upload the results if you don't have a sane result? I'm not sure how we could solve this in a reliable way.
Not saying there's something wrong with gem test
. I'm just wondering if there's a way to modify my gem so it runs rake db:migrate
before rake test
automatically.
I think I got it:
namespace :db do
task :abort_if_pending_migrations => [:migrate]
end
That does the trick.
Lets say to test my gem I need to run migrations first. Testing db is sqlite so there's no configuration, but
rake db:migrate
needs to be run beforerake test
. Any thoughts how it can be accomplished?