diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-01 10:57:39 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-06 15:09:45 -0700 |
commit | 88b31b56f0e3faf7a8090885780a35ff9e38e7b1 (patch) | |
tree | e4ec183bbb602a8f9eacfe663da70c6895592b2c /spec/unit/log | |
parent | b18023d7ffe8ab8de2fbc6d27f1da7d83c85b737 (diff) | |
download | chef-88b31b56f0e3faf7a8090885780a35ff9e38e7b1.tar.gz |
avoid any_instance_of indirection
Diffstat (limited to 'spec/unit/log')
-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 |