diff options
author | Christopher Brown <cb@opscode.com> | 2009-12-11 15:09:59 -0800 |
---|---|---|
committer | Christopher Brown <cb@opscode.com> | 2009-12-11 15:09:59 -0800 |
commit | 1c18b2b2badc4de2f5c13b55759aae3399551dc5 (patch) | |
tree | cc71b87564abe620443ef7a9686c11ad7d0e640c | |
parent | e0bb871736e8e517547fd0f79c6597078608b6d6 (diff) | |
download | mixlib-log-1c18b2b2badc4de2f5c13b55759aae3399551dc5.tar.gz |
fix log level setting
-rw-r--r-- | features/steps/log.rb | 2 | ||||
-rw-r--r-- | spec/mixlib/log_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/features/steps/log.rb b/features/steps/log.rb index 13a8fea..d8a5070 100644 --- a/features/steps/log.rb +++ b/features/steps/log.rb @@ -17,7 +17,7 @@ # Given /^a base log level of '(.+)'$/ do |level| - Logit.level(level.to_sym) + Logit.level = level.to_sym end When /^the message '(.+)' is sent at the '(.+)' level$/ do |message, level| diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb index 259ae36..2c90b08 100644 --- a/spec/mixlib/log_spec.rb +++ b/spec/mixlib/log_spec.rb @@ -43,17 +43,17 @@ describe Mixlib::Log do :fatal => Logger::FATAL } levels.each do |symbol, constant| - Logit.level(symbol) + Logit.level = symbol Logit.logger.level.should == constant end end it "should raise an ArgumentError if you try and set the level to something strange" do - lambda { Logit.level(:the_roots) }.should raise_error(ArgumentError) + lambda { Logit.level = :the_roots }.should raise_error(ArgumentError) end it "should pass other method calls directly to logger" do - Logit.level(:debug) + Logit.level = :debug Logit.should be_debug lambda { Logit.debug("Gimme some sugar!") }.should_not raise_error end |