public
Description: A fully featured forum system compatible with Rails 2.3
Homepage: http://forum.frozenplague.net
Clone URL: git://github.com/radar/rboard.git
Click here to lend your support to: rboard and make a donation at www.pledgie.com !
rboard / .autotest
8fb0883c » radar 2008-06-26 Added even more tests, an .... 1 module Autotest::Growl
2
3 def self.growl title, msg, img, pri=0, sticky=""
4 system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}"
5 end
6
7 Autotest.add_hook :ran_command do |at|
8 results = [at.results].flatten.join("\n")
9 output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?/)
10 if output
11 if $~[2].to_i > 0
12 growl "FAIL", "#{output}", "~/.autotest_images/fail.png", 2
13 else
14 growl "Pass", "#{output}", "~/.autotest_images/pass.png"
15 end
16 end
17 end
18 end