-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathautotest
More file actions
executable file
·31 lines (23 loc) · 870 Bytes
/
Copy pathautotest
File metadata and controls
executable file
·31 lines (23 loc) · 870 Bytes
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
require 'active_support/inflector'
require 'autotest/growl'
require 'autotest/timestamp'
Autotest::Growl::image_dir = File.join(ENV['HOME'], '.autotest_images')
Autotest.add_hook :initialize do |at|
%w{.git vendor rerun.txt}.each {|exception| at.add_exception(exception)}
end
# module Autotest::Growl
# def self.growl title, msg, img, pri=0, sticky=""
# system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}"
# end
#
# Autotest.add_hook :ran_command do |at|
# image_root = "~/.autotest_images"
# output = at.results.last.slice(/(\d+)\stests,\s(\d+)\sassertions,\s(\d+)\sfailures,\s(\d+)\serrors/)
#
# if ($~[3].to_i > 0) or ($~[4].to_i > 0)
# growl "FAIL", "#{output}", "#{image_root}/fail.png", 2
# else
# growl "Pass", "#{output}", "#{image_root}/pass.png"
# end
# end
# end