diff options
-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 |