Skip to content

Instantly share code, notes, and snippets.

@Peeja
Created November 21, 2008 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Peeja/27542 to your computer and use it in GitHub Desktop.
Save Peeja/27542 to your computer and use it in GitHub Desktop.
If you've got pending migrations, tells you why all your tests/specs failed.
# If you've got pending migrations, tells you why all your tests/specs failed.
module Autotest::Migrations
Autotest.add_hook :ran_command do |autotest|
if autotest.class.name =~ /Rails/
system "rake db:abort_if_pending_migrations"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment