Created
July 30, 2011 10:42
-
-
Save fantactuka/1115402 to your computer and use it in GitHub Desktop.
Rerun all tests after changed tests passed
This file contains hidden or 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
# encoding: utf-8 | |
require "test_notifier/runner/autotest" | |
class Autotest | |
alias :original_get_to_green :get_to_green | |
def get_to_green | |
original_get_to_green | |
rerun_all_tests | |
end | |
end | |
Autotest.add_discovery do | |
"rspec2" | |
end | |
Autotest.add_hook(:initialize) do |at| | |
at.add_exception %r{^\.git} # ignore Version Control System | |
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again... | |
at.add_mapping(%r{^lib/.*\.rb$}) do | |
Dir['spec/**/*_spec.rb'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment