lib/autotest_notification/mac.rb in urubatan-autotest-notification-0.2.0 vs lib/autotest_notification/mac.rb in urubatan-autotest-notification-1.0.1
- old
+ new
@@ -1,9 +1,10 @@
module AutotestNotification
class Mac
class << self
- def notify(title, msg, img, pri = 0)
- system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title}"
+ def notify(title, msg, img, failures = 0, pri = 0)
+ system "growlnotify -n autotest --image #{img} -p #{pri} -m '#{msg}' #{title}"
+ system("say #{failures} test#{'s' unless failures == 1} failed.") if SPEAKING && failures > 0
end
end
end
end