better message

This commit is contained in:
John Bintz 2011-06-30 23:56:32 -04:00
parent f58a41da14
commit 217bb55774
2 changed files with 4 additions and 3 deletions

View File

@ -15,10 +15,11 @@ module ::Guard
UI.info(msg = "Applying Puppet configuration...")
Notifier.notify msg, :title => "Puppet Config", :image => :pending
if Runner.new(@options).run != 0
Notifier.notify "Puppet config failure!", :title => "Puppet Config", :image => :failed
Notifier.notify(msg = "Puppet config failure!", :title => "Puppet Config", :image => :failed)
else
Notifier.notify "Puppet config reapplied successfully!", :title => "Puppet Config"
Notifier.notify(msg = "Puppet config reapplied successfully!", :title => "Puppet Config")
end
UI.info(msg)
end
def run_on_change(files = [])

View File

@ -6,7 +6,7 @@ describe Guard::Puppet do
describe '#run_all' do
before do
Guard::UI.expects(:info)
Guard::UI.stubs(:info)
Guard::Notifier.expects(:notify).with("Applying Puppet configuration...", { :image => :pending, :title => "Puppet Config" })
Guard::Puppet::Runner.any_instance.expects(:run).returns(return_value)
end