diff --git a/lib/guard/puppet.rb b/lib/guard/puppet.rb index da6307e..a826d24 100644 --- a/lib/guard/puppet.rb +++ b/lib/guard/puppet.rb @@ -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 = []) diff --git a/spec/lib/guard/puppet_spec.rb b/spec/lib/guard/puppet_spec.rb index d58f519..70993d6 100644 --- a/spec/lib/guard/puppet_spec.rb +++ b/spec/lib/guard/puppet_spec.rb @@ -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