Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 517 Bytes
Autotest.add_hook :initialize do |t|
t.clear_mappings
t.add_exception(/^(?:\/\.)?\.git.*/)
t.add_exception(/^(?:\/\.)?\[\..*/)
t.add_mapping(/^lib\/.*\.rb$/) { |fn, _|
t.files_matching(/^test\/#{File.basename(fn, '.rb')}_test.rb$/) }
t.add_mapping(/^test\/.*_test\.rb$/) { |fn, _| fn }
def t.path_to_classname(s)
case s
when 'test/test_cache.rb'
"Rack::Cache"
when /test\/(.*)_test\.rb/
"Rack::Cache::#{$1.capitalize}"
else
super
end
end
end
# vim: ft=ruby