-
Notifications
You must be signed in to change notification settings - Fork 0
/
.autotest
46 lines (38 loc) · 1.2 KB
/
.autotest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/ruby
#require 'redgreen'
require 'autotest/timestamp'
#module Autotest::GnomeNotify
# def self.notify title, msg, img
# system "notify-send '#{title}' '#{msg}' -i #{img} -t 3000"
# end
#
# Autotest.add_hook :ran_command do |at|
# image_root = "~/.autotest_images"
# results = [at.results].flatten.join("\n")
# results.gsub!(/\\e\[\d+m/,'')
# output = results.slice(/(\d+)\sexamples?,\s(\d+)\sfailures?/)
# puts output.inspect
# if output
# if $~[2].to_i > 0
# notify "FAIL", "#{output}", "#{image_root}/fail.png"
# else
# notify "Pass", "#{output}", "#{image_root}/pass.png"
# end
# end
# end
Autotest.add_hook :initialize do |autotest|
autotest.add_mapping(%r%^spec/(app|lib)/.*rb$%) do|filename, _|
filename
end
#autotest.add_mapping(%r%^.*rb$%) do|filename, _|
# filename
#end
autotest.add_exception(%r%spec/dummy/app%)
autotest.add_exception(%r%spec/dummy/db%)
autotest.add_exception(%r%spec/dummy/lib%)
autotest.add_exception(%r%spec/dummy/config%)
autotest.add_exception(%r%spec/dummy/log%)
autotest.add_exception(%r%spec/dummy/public%)
autotest.add_exception(%r%\.git%)
end
#end