diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-01 10:57:39 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-04 15:57:12 -0700 |
commit | 9640f68c24e109ca42a8535881d4100871895cf9 (patch) | |
tree | 816dadf8206a3ca4e0f051737397dce550564617 | |
parent | a1459b779fc4d91973f26bff9f1f4076a13f7bdd (diff) | |
download | chef-9640f68c24e109ca42a8535881d4100871895cf9.tar.gz |
avoid any_instance_of indirection
-rw-r--r-- | spec/unit/log/syslog_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/log/syslog_spec.rb b/spec/unit/log/syslog_spec.rb index c65aadafd4..36b4a01481 100644 --- a/spec/unit/log/syslog_spec.rb +++ b/spec/unit/log/syslog_spec.rb @@ -30,17 +30,17 @@ describe "Chef::Log::Syslog", :unix_only => true do end it "should send message with severity info to syslog." do - expect_any_instance_of(Logger::Syslog).to receive(:info).with("*** Chef 12.4.0.dev.0 ***") + expect(syslog).to receive(:info).with("*** Chef 12.4.0.dev.0 ***") Chef::Log.info("*** Chef 12.4.0.dev.0 ***") end it "should send message with severity warning to syslog." do - expect_any_instance_of(Logger::Syslog).to receive(:warn).with("No config file found or specified on command line, using command line options.") + expect(syslog).to receive(:warn).with("No config file found or specified on command line, using command line options.") Chef::Log.warn("No config file found or specified on command line, using command line options.") end it "should fallback into send message with severity info to syslog when wrong format." do - expect_any_instance_of(Logger::Syslog).to receive(:info).with("chef message") + expect(syslog).to receive(:info).with("chef message") syslog.write("chef message") end end |