From 7429b1fbf5585b20c2634d69eb6cfcc1355e07e9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 29 Jun 2011 09:52:04 -0400 Subject: [PATCH] use right icon name for growl notifications --- lib/guard/rails.rb | 2 +- spec/lib/guard/rails_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/guard/rails.rb b/lib/guard/rails.rb index fccb19d..c7a9608 100644 --- a/lib/guard/rails.rb +++ b/lib/guard/rails.rb @@ -35,7 +35,7 @@ module Guard Notifier.notify("Rails restarted on port #{options[:port]}.", :title => "Rails restarted!", :image => :success) else UI.info "Rails NOT restarted, check your log files." - Notifier.notify("Rails NOT restarted, check your log files.", :title => "Rails NOT restarted!", :image => :failure) + Notifier.notify("Rails NOT restarted, check your log files.", :title => "Rails NOT restarted!", :image => :failed) end end diff --git a/spec/lib/guard/rails_spec.rb b/spec/lib/guard/rails_spec.rb index 4047e79..569e866 100644 --- a/spec/lib/guard/rails_spec.rb +++ b/spec/lib/guard/rails_spec.rb @@ -41,7 +41,7 @@ describe Guard::Rails do before do Guard::UI.expects(:info).with('Restarting Rails...') - Guard::Notifier.expects(:notify).with(regexp_matches(/Rails restarting/), anything) + Guard::Notifier.expects(:notify).with(regexp_matches(/Rails restarting/), has_entry(:image => :pending)) Guard::RailsRunner.any_instance.stubs(:pid).returns(pid) end @@ -54,7 +54,7 @@ describe Guard::Rails do it "should restart and show the pid file" do Guard::UI.expects(:info).with(regexp_matches(/#{pid}/)) - Guard::Notifier.expects(:notify).with(regexp_matches(/Rails restarted/), anything) + Guard::Notifier.expects(:notify).with(regexp_matches(/Rails restarted/), has_entry(:image => :success)) guard.run_all end @@ -68,7 +68,7 @@ describe Guard::Rails do it "should restart and show the pid file" do Guard::UI.expects(:info).with(regexp_matches(/#{pid}/)).never Guard::UI.expects(:info).with(regexp_matches(/Rails NOT restarted/)) - Guard::Notifier.expects(:notify).with(regexp_matches(/Rails NOT restarted/), anything) + Guard::Notifier.expects(:notify).with(regexp_matches(/Rails NOT restarted/), has_entry(:image => :failed)) guard.run_all end