From d08cbdaad788da3b9b1658717353f939361b3add Mon Sep 17 00:00:00 2001 From: Steven Murawski Date: Tue, 4 Apr 2017 15:29:44 -0500 Subject: removing the use of Chef::Exception::DeprecatedExitCode Signed-off-by: Steven Murawski --- spec/unit/application/exit_code_spec.rb | 6 +----- spec/unit/config_fetcher_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'spec') 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 -- cgit v1.2.1