summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2019-06-05 19:01:13 -0700
committerRyan Davis <ryand-ruby@zenspider.com>2019-06-05 19:01:13 -0700
commit9b2d51adfff3d6dda5e8fc0ca1d5c0eb40e7a393 (patch)
tree583cc62abe35afe46dccd6e8f913824011acd6c6
parentba8904c71357ddda0e18d95f3184307cd52be710 (diff)
downloadmixlib-log-9b2d51adfff3d6dda5e8fc0ca1d5c0eb40e7a393.tar.gz
Minor spec cleanup, using the block form of expect.
Signed-off-by: Ryan Davis <zenspider@chef.io>
-rw-r--r--spec/mixlib/log_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb
index 5e0f270..bbf290b 100644
--- a/spec/mixlib/log_spec.rb
+++ b/spec/mixlib/log_spec.rb
@@ -134,17 +134,17 @@ RSpec.describe Mixlib::Log do
end
it "should raise an ArgumentError if you try and set the level to something strange using the binding form" do
- expect(lambda { Logit.level = :the_roots }).to raise_error(ArgumentError)
+ expect { Logit.level = :the_roots }.to raise_error(ArgumentError)
end
it "should raise an ArgumentError if you try and set the level to something strange using the method form" do
- expect(lambda { Logit.level(:the_roots) }).to raise_error(ArgumentError)
+ expect { Logit.level(:the_roots) }.to raise_error(ArgumentError)
end
it "should pass other method calls directly to logger" do
Logit.level = :debug
expect(Logit).to be_debug
- expect(lambda { Logit.debug("Gimme some sugar!") }).to_not raise_error
+ expect { Logit.debug("Gimme some sugar!") }.to_not raise_error
end
it "should pass add method calls directly to logger" do
@@ -152,7 +152,7 @@ RSpec.describe Mixlib::Log do
Logit.init(logdev)
Logit.level = :debug
expect(Logit).to be_debug
- expect(lambda { Logit.add(Logger::DEBUG, "Gimme some sugar!") }).to_not raise_error
+ expect { Logit.add(Logger::DEBUG, "Gimme some sugar!") }.to_not raise_error
expect(logdev.string).to match(/Gimme some sugar/)
end