diff options
| author | Luke Kanies <luke@madstop.com> | 2008-10-03 17:39:18 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-10-04 08:48:44 +1000 |
| commit | a7744438f83c97886e81990fb34ddcbab8bc0d9e (patch) | |
| tree | ebbb6ab387d5a00d6eecb14a0d6624a272fce5a8 /spec | |
| parent | db7f108f546db2114f87316c68d33706c9e4142e (diff) | |
| download | puppet-a7744438f83c97886e81990fb34ddcbab8bc0d9e.tar.gz puppet-a7744438f83c97886e81990fb34ddcbab8bc0d9e.tar.xz puppet-a7744438f83c97886e81990fb34ddcbab8bc0d9e.zip | |
Fixing #1089 - Log messages are now tagged with the log level,
making it easier to match messages in the 'tagmail' report.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/util/log.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/util/log.rb b/spec/unit/util/log.rb index 7f37e9f4c..aa00602a9 100755 --- a/spec/unit/util/log.rb +++ b/spec/unit/util/log.rb @@ -60,7 +60,9 @@ describe Puppet::Util::Log do end it "should make available any passed-in tags" do - Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{foo bar}).tags.should == %w{foo bar} + log = Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{foo bar}) + log.tags.should be_include("foo") + log.tags.should be_include("bar") end it "should use an passed-in source" do @@ -86,8 +88,7 @@ describe Puppet::Util::Log do end it "should tag itself with its log level" do - pending "not yet" - Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{one two}).should be_tagged(:one) + Puppet::Util::Log.new(:level => "notice", :message => :foo).should be_tagged(:notice) end it "should return its message when converted to a string" do |
