summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-20 17:34:49 -0800
committerSerdar Sutay <serdar@opscode.com>2014-11-21 14:58:03 -0800
commite122fcb39185f3ec7ebaf18f62be54d6f7e896a4 (patch)
tree5cdb71b965225eddbc1963ec6ee464bf2aa6dbe6
parent62bca68cc0138b0adce34de502e159d5a7aba90e (diff)
downloadchef-e122fcb39185f3ec7ebaf18f62be54d6f7e896a4.tar.gz
Disable audit phase during specs in order not to break the existing rspec configuration.
-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 e3de80f3f1..2b880dc200 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -164,6 +164,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