lib/rspec_growler.rb in mislav-rspactor-0.3.3 vs lib/rspec_growler.rb in mislav-rspactor-0.4.0

- old
+ new

@@ -1,8 +1,11 @@ require 'spec/runner/formatter/base_formatter' +require File.dirname(__FILE__) + '/rspactor/growl' class RSpecGrowler < Spec::Runner::Formatter::BaseFormatter + include RSpactor::Growl + def dump_summary(duration, total, failures, pending) icon = if failures > 0 'failed' elsif pending > 0 'pending' @@ -15,13 +18,9 @@ if pending > 0 message << " (#{pending} pending)" end - growl "Test Results", message, image_path, 0 - end - - def growl(title, msg, img, pri = 0) - system("growlnotify -w -n rspactor --image #{img} -p #{pri} -m #{msg.inspect} #{title} &") + notify "Test Results", message, image_path(icon) end end