Created
February 8, 2011 03:09
-
-
Save aaronjensen/815776 to your computer and use it in GitHub Desktop.
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) {|at| | |
%w{.git .svn .hg .swp .DS_Store ._* tmp}.each do |exception| | |
at.add_exception(exception) | |
end | |
at.clear_mappings # take out the default (test/test*rb) | |
at.add_mapping(%r%^(spec|third_party)/.*_spec.rb$%) { |filename, _| | |
filename | |
} | |
at.add_mapping(%r%^app/(.*)\.rb$%) { |_, m| | |
["spec/#{m[1]}_spec.rb"] | |
} | |
at.add_mapping(%r%^spec/(spec_helper|shared/.*)\.rb$%) { | |
at.files_matching %r%^(spec|third_party)/.*_spec\.rb$% | |
} | |
#nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment