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