Created
July 27, 2010 08:51
-
-
Save icantrap/491954 to your computer and use it in GitHub Desktop.
Autotest init hook - rerun all when new test db is created
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Autotest.add_hook :initialize do |autotest| | |
# remove the exceptions added by autotest-rails, then readd them w/o test.sqlite3 | |
autotest.remove_exception %r%^\./(?:db|doc|log|public|script|tmp|vendor)% | |
autotest.add_exception %r%^\./(?:doc|log|public|script|tmp|vendor)% | |
autotest.add_exception %r%^\./db/(?:migrate|(development\.sqlite3|.*\.rb)$)% | |
autotest.add_mapping %r%^db/test.sqlite3$% do |filename, match_data| | |
autotest.files_matching %r%^test/(unit|controllers|views|functional)/.*_test\.rb$% | |
end | |
false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment