summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/application/exit_code_spec.rb6
-rw-r--r--spec/unit/config_fetcher_spec.rb4
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