diff options
author | Stuart Preston <stuart@chef.io> | 2018-04-04 17:44:18 +0100 |
---|---|---|
committer | Stuart Preston <stuart@chef.io> | 2018-04-04 17:44:18 +0100 |
commit | fe13ba5b1aecdab27add5670ccae5d44094579bd (patch) | |
tree | f4514bfe6db97f0cce611408768ca19baa94bc3f | |
parent | 0bd46bc1a2bd35a2ead15dc87b1f1be7f742973e (diff) | |
download | mixlib-log-sp/tracing_trace.tar.gz |
Adding failing test for trace: level messagessp/tracing_trace
Signed-off-by: Stuart Preston <stuart@chef.io>
-rw-r--r-- | spec/mixlib/log_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb index 0cfc7e0..5f6b0e2 100644 --- a/spec/mixlib/log_spec.rb +++ b/spec/mixlib/log_spec.rb @@ -221,4 +221,15 @@ RSpec.describe Mixlib::Log do expect(Logit.metadata).to eql({ test: "data" }) end + it "should format :trace level messages with TRACE: label" do + logdev = StringIO.new + Logit.init(logdev) + Logit.level = :trace + Logit.trace("this is a log message") + aggregate_failures do + expect(logdev.string).to_not match(/ANY:/) + expect(logdev.string).to match(/TRACE:/) + end + end + end |