cschneid / wink forked from rtomayko/wink

The minimalists weblog engine.

This URL has Read+Write access

wink / .autotest
100644 19 lines (16 sloc) 0.593 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Autotest.add_hook :initialize do |at|
  at.instance_eval do
    add_exception(/\/?\.git\/.*/)
    add_exception(/\.log$/)
    add_exception(/(?:README|\.gitignore|\.gitmodules)$/)
    add_exception(/^(?:\.\/)?(doc|bugs|sinatra)\//)
    add_exception(/^(?:\.\/)?\.autotest/)
 
    clear_mappings
    all = proc { |vn,_| files_matching(/^test\/.*_test.rb$/) }
    add_mapping(/lib\/.*\.rb/, &all)
    add_mapping(/^(?:\.\/)?views\/.*$/, &all)
    add_mapping(/^(?:\.\/)?test\/(?:help|fixtures)\.rb$/, &all)
    add_mapping(/^(?:\.\/)?test\/.*_test\.rb$/) { |fn, _| fn }
  end
end
 
# vim: ft=ruby