diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-11-20 17:34:49 -0800 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-11-20 17:34:49 -0800 |
commit | d7e87a67b3797e923e544275aca2709d34954281 (patch) | |
tree | 013e09bc0f1bb58b5ecf7770eb412bb4bb80cdeb | |
parent | f43f056a1c476f401f3a1b69d65912cc544a4f55 (diff) | |
download | chef-d7e87a67b3797e923e544275aca2709d34954281.tar.gz |
Disable audit phase during specs in order not to break the existing rspec configuration.
-rw-r--r-- | spec/spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/unit/client_spec.rb | 5 |
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 10958d628c..785ae5ae3e 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -251,6 +251,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_node_save |