summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-20 17:34:49 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:52:03 -0800
commitd223f2480cecb211a8c54edbb6ff4e7a46f9be9b (patch)
tree5a7d39171d1f8e44f0e7200cef6e998bf5abe9a7 /spec
parent0066549c2f45ca4ed8e1e3b3e1a8990efafa1019 (diff)
downloadchef-d223f2480cecb211a8c54edbb6ff4e7a46f9be9b.tar.gz
Disable audit phase during specs in order not to break the existing rspec configuration.
Diffstat (limited to 'spec')
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/unit/client_spec.rb5
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 995be5060b..9f8cc754b7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -169,6 +169,8 @@ RSpec.configure do |config|
config.before(:each) do
Chef::Config.reset
+
+ allow_any_instance_of(Chef::Audit::Runner).to receive(:run).and_return(true)
end
config.before(:suite) do
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index eb13efbf76..71c30ed532 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -252,6 +252,11 @@ describe Chef::Client do
# updates the server with the resource history
# (has its own tests, so stubbing it here.)
expect_any_instance_of(Chef::ResourceReporter).to receive(:run_completed)
+
+ # --AuditReporter#audit_phase_complete
+ # posts the audit data to server.
+ # (has its own tests, so stubbing it here.)
+ expect_any_instance_of(Chef::Audit::AuditReporter).to receive(:audit_phase_complete)
end
def stub_for_audit