diff options
author | Steven Murawski <steven.murawski@gmail.com> | 2017-04-04 15:29:44 -0500 |
---|---|---|
committer | Steven Murawski <steven.murawski@gmail.com> | 2017-04-04 15:29:44 -0500 |
commit | d08cbdaad788da3b9b1658717353f939361b3add (patch) | |
tree | 2316dacebcf1dd8c5c92a227f25335d4a3812997 /spec | |
parent | 4b0926387418cd8d4105c125aebd23e68b612ff4 (diff) | |
download | chef-d08cbdaad788da3b9b1658717353f939361b3add.tar.gz |
removing the use of Chef::Exception::DeprecatedExitCodesmurawski/exit_status_default
Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/application/exit_code_spec.rb | 6 | ||||
-rw-r--r-- | spec/unit/config_fetcher_spec.rb | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/spec/unit/application/exit_code_spec.rb b/spec/unit/application/exit_code_spec.rb index a3e5855f8a..7783cf3ed7 100644 --- a/spec/unit/application/exit_code_spec.rb +++ b/spec/unit/application/exit_code_spec.rb @@ -73,7 +73,7 @@ describe Chef::Application::ExitCode do context "when Chef validates exit codes" do it "does write a warning on non-standard exit codes" do - expect(Chef::Log).to receive(:warn).with( + expect(Chef::Log).to receive(:warn).with( /^Chef attempted to exit with a non-standard exit code of 151/) expect(exit_codes.normalize_exit_code(151)).to eq(1) end @@ -94,10 +94,6 @@ describe Chef::Application::ExitCode do expect(exit_codes.normalize_exit_code(Chef::Exceptions::SigTerm.new("BOOM"))).to eq(3) end - it "returns GENERIC_FAILURE when a deprecated exit code error is received" do - expect(exit_codes.normalize_exit_code(Chef::Exceptions::DeprecatedExitCode.new("BOOM"))).to eq(1) - end - it "returns GENERIC_FAILURE when an exception is specified" do expect(exit_codes.normalize_exit_code(Exception.new("BOOM"))).to eq(1) end diff --git a/spec/unit/config_fetcher_spec.rb b/spec/unit/config_fetcher_spec.rb index 6847ee5fd3..a674d4de33 100644 --- a/spec/unit/config_fetcher_spec.rb +++ b/spec/unit/config_fetcher_spec.rb @@ -58,7 +58,7 @@ describe Chef::ConfigFetcher do and_return(invalid_json) expect(Chef::Application).to receive(:fatal!). - with(invalid_json_error_regex, Chef::Exceptions::DeprecatedExitCode.new) + with(invalid_json_error_regex) fetcher.fetch_json end end @@ -104,7 +104,7 @@ describe Chef::ConfigFetcher do with("").and_return(invalid_json) expect(Chef::Application).to receive(:fatal!). - with(invalid_json_error_regex, Chef::Exceptions::DeprecatedExitCode.new) + with(invalid_json_error_regex) fetcher.fetch_json end end |