public
Description: Real HTTP Caching for Ruby Web Apps
Homepage: http://tomayko.com/src/rack-cache/
Clone URL: git://github.com/rtomayko/rack-cache.git
rack-cache / .autotest
100644 24 lines (19 sloc) 0.517 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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