summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/util/log.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/util/log.rb b/spec/unit/util/log.rb
index 97fb2f297..7aaa580c5 100755
--- a/spec/unit/util/log.rb
+++ b/spec/unit/util/log.rb
@@ -114,6 +114,13 @@ describe Puppet::Util::Log do
Puppet::Util::Log.new(:level => "notice", :message => :foo, :source => "foo")
end
+ [:file, :line, :version].each do |attr|
+ it "should use #{attr} if provided" do
+ Puppet::Util::Log.any_instance.expects(attr.to_s + "=").with "foo"
+ Puppet::Util::Log.new(:level => "notice", :message => :foo, attr => "foo")
+ end
+ end
+
it "should default to 'Puppet' as its source" do
Puppet::Util::Log.new(:level => "notice", :message => :foo).source.should == "Puppet"
end