diff options
author | Luke Kanies <luke@madstop.com> | 2009-11-07 15:48:57 -0600 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 2292b768c93a1ccba91cfe92d60c65ed936dd45c (patch) | |
tree | 0759e4ff470941fc6bb5c9f6b5391b5f430c1291 /spec/unit/parameter.rb | |
parent | d93d80a0afdbd53d87dc4a7498609117091e864b (diff) | |
download | puppet-2292b768c93a1ccba91cfe92d60c65ed936dd45c.tar.gz puppet-2292b768c93a1ccba91cfe92d60c65ed936dd45c.tar.xz puppet-2292b768c93a1ccba91cfe92d60c65ed936dd45c.zip |
Refactoring the RAL interface to logging
Previously, the Log class knew a lot about RAL objects,
but now the Logging module is the only one that does.
This greatly simplifies the Log class, which is good,
and means that whatever complexity does need to exist
is directly exposed in the Logging middleware module.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parameter.rb')
-rwxr-xr-x | spec/unit/parameter.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/parameter.rb b/spec/unit/parameter.rb index 817b5c6d6..f4473248a 100755 --- a/spec/unit/parameter.rb +++ b/spec/unit/parameter.rb @@ -157,5 +157,12 @@ describe Puppet::Parameter do @parameter.munge("bar").should == "bar" end end -end + describe "when logging" do + it "should use its resource's log level and the provided message" do + @resource.expects(:[]).with(:loglevel).returns :notice + @parameter.expects(:send_log).with(:notice, "mymessage") + @parameter.log "mymessage" + end + end +end |