diff options
Diffstat (limited to 'spec/unit/util/warnings_spec.rb')
-rwxr-xr-x | spec/unit/util/warnings_spec.rb | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/spec/unit/util/warnings_spec.rb b/spec/unit/util/warnings_spec.rb index 7cdee007f..c05c9837b 100755 --- a/spec/unit/util/warnings_spec.rb +++ b/spec/unit/util/warnings_spec.rb @@ -3,37 +3,37 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Util::Warnings do - before(:all) do - @msg1 = "booness" - @msg2 = "more booness" - end + before(:all) do + @msg1 = "booness" + @msg2 = "more booness" + end - {:notice => "notice_once", :warning => "warnonce"}.each do |log, method| - describe "when registring '#{log}' messages" do - it "should always return nil" do - Puppet::Util::Warnings.send(method, @msg1).should be(nil) - end + {:notice => "notice_once", :warning => "warnonce"}.each do |log, method| + describe "when registring '#{log}' messages" do + it "should always return nil" do + Puppet::Util::Warnings.send(method, @msg1).should be(nil) + end - it "should issue a warning" do - Puppet.expects(log).with(@msg1) - Puppet::Util::Warnings.send(method, @msg1) - end + it "should issue a warning" do + Puppet.expects(log).with(@msg1) + Puppet::Util::Warnings.send(method, @msg1) + end - it "should issue a warning exactly once per unique message" do - Puppet.expects(log).with(@msg1).once - Puppet::Util::Warnings.send(method, @msg1) - Puppet::Util::Warnings.send(method, @msg1) - end + it "should issue a warning exactly once per unique message" do + Puppet.expects(log).with(@msg1).once + Puppet::Util::Warnings.send(method, @msg1) + Puppet::Util::Warnings.send(method, @msg1) + end - it "should issue multiple warnings for multiple unique messages" do - Puppet.expects(log).times(2) - Puppet::Util::Warnings.send(method, @msg1) - Puppet::Util::Warnings.send(method, @msg2) - end - end + it "should issue multiple warnings for multiple unique messages" do + Puppet.expects(log).times(2) + Puppet::Util::Warnings.send(method, @msg1) + Puppet::Util::Warnings.send(method, @msg2) + end end + end - after(:each) do - Puppet::Util::Warnings.clear_warnings - end + after(:each) do + Puppet::Util::Warnings.clear_warnings + end end |