forked from assaf/vanity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.autotest
More file actions
22 lines (20 loc) · 711 Bytes
/
.autotest
File metadata and controls
22 lines (20 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env ruby
Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store Gemfile bin doc html}.each do |exception|
autotest.add_exception(exception)
end
autotest.clear_mappings
autotest.add_mapping(/^test.*\/.*_test\.rb$/) { |filename, _| filename }
autotest.add_mapping(/test_helper.rb/) { |f, _| autotest.files_matching(/test\/.*_test\.rb$/) }
autotest.add_mapping(/^lib\/vanity\/(.*)\.rb/) do |filename, _|
file = File.basename(filename, '.rb')
dir = File.split(File.dirname(filename)).last
autotest.files_matching %r%^test/(#{file}|#{dir})_test.rb$%
end
end
# Don't run entire test suite when going from red to green
class Autotest
def tainted
false
end
end