Created
January 14, 2011 15:40
-
-
Save JonRowe/779753 to your computer and use it in GitHub Desktop.
A generic rails .autotest mappings file
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
egin | |
require 'autotest/fsevent' | |
rescue LoadError | |
end | |
Autotest.add_hook :initialize do |at| | |
at.add_mapping(/^spec\/**\/*_spec\.rb$/, true){ |filename, _| | |
filename | |
} | |
at.add_mapping(/^spec\/support\/.*\.rb$/, true) { |_, _| | |
Dir['spec/**/*_spec.rb'] | |
} | |
at.add_mapping(/^app\/(.*)\.rb$/, true) { |_, m| | |
Dir["spec/#{m[1]}_spec.rb"] | |
} | |
nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment