Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 293 Bytes
Autotest.add_hook :initialize do |at|
at.clear_mappings
# Run any test that changes
at.add_mapping(%r{^test/.*_test\.rb$}) do |f, _|
[f]
end
# Run tests for any file that changes in lib
at.add_mapping(%r{^lib((/[^/]+)+)\.rb$}) do |_, m|
["test#{m[1]}_test.rb"]
end
end