public
Description: A Rails plugin to make it easy to use YUI on Rails instead of (or along with, I suppose) Prototype and scriptaculous
Clone URL: git://github.com/rubaidh/yui_on_rails.git
Search Repo:
yui_on_rails / .autotest
100644 17 lines (14 sloc) 0.47 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Autotest.add_hook :initialize do |at|
  at.add_exception %r%^\./(?:tasks|resources)%
  at.clear_mappings
 
  at.add_mapping(%r(lib/.*\.rb$)) do |filename, _|
    test_filename = filename.gsub(/^lib/, 'test').gsub(/\.rb$/, '_test.rb')
    at.files_matching %r{^#{test_filename}$}
  end
 
  at.add_mapping %r{^test/test_helper.rb$} do |filename, _|
    at.files_matching %r{test/.*_test\.rb$}
  end
 
  at.add_mapping %r{^test/.*\.rb$} do |filename, _|
    filename
  end
end