Skip to content

Commit

Permalink
Set the priority of the growl message based on the outcome
Browse files Browse the repository at this point in the history
Depends on indirect/guard@ae1ae1cfbdf82a4bb2caaa585aecb3f13c7abf82
  • Loading branch information
indirect authored and netzpirat committed May 30, 2011
1 parent b9c644e commit f52932f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/guard/rspec/formatter.rb
Expand Up @@ -22,8 +22,16 @@ def guard_image(failure_count, pending_count)
end
end

def priority(image)
{ :failed => 2,
:pending => -1,
:success => -2
}[image]
end

def notify(message, image)
Guard::Notifier.notify(message, :title => "RSpec results", :image => image)
Guard::Notifier.notify(message, :title => "RSpec results", :image => image,
:priority => priority(image))
end

private
Expand Down

0 comments on commit f52932f

Please sign in to comment.