use right icon name for growl notifications

This commit is contained in:
John Bintz 2011-06-29 09:52:04 -04:00
parent 4836e968d6
commit 7429b1fbf5
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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