summaryrefslogtreecommitdiff
path: root/spec/support/shared/context/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared/context/client.rb')
-rw-r--r--spec/support/shared/context/client.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/support/shared/context/client.rb b/spec/support/shared/context/client.rb
index f5c21a3c65..eb537e9889 100644
--- a/spec/support/shared/context/client.rb
+++ b/spec/support/shared/context/client.rb
@@ -201,7 +201,6 @@ shared_context "audit phase completed" do
def stub_for_audit
# -- Client#run_audits
expect(Chef::Audit::Runner).to receive(:new).and_return(audit_runner)
- expect(Chef::Audit::Logger).to receive(:read_buffer).and_return("Audit mode output!")
expect(audit_runner).to receive(:run).and_return(true)
expect(client.events).to receive(:audit_phase_complete)
end
@@ -218,7 +217,7 @@ shared_context "audit phase failed with error" do
expect(Chef::Audit::Runner).to receive(:new).and_return(audit_runner)
expect(Chef::Audit::Logger).to receive(:read_buffer).and_return("Audit mode output!")
expect(audit_runner).to receive(:run).and_raise(audit_error)
- expect(client.events).to receive(:audit_phase_failed).with(audit_error)
+ expect(client.events).to receive(:audit_phase_failed).with(audit_error, "Audit mode output!")
end
end
@@ -239,7 +238,7 @@ shared_context "audit phase completed with failed controls" do
expect(Chef::Exceptions::AuditsFailed).to receive(:new).with(
audit_runner.num_failed, audit_runner.num_total
).and_return(audit_error)
- expect(client.events).to receive(:audit_phase_failed).with(audit_error)
+ expect(client.events).to receive(:audit_phase_failed).with(audit_error, "Audit mode output!")
end
end