summaryrefslogtreecommitdiff
path: root/spec/unit/application/exit_code_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/application/exit_code_spec.rb')
-rw-r--r--spec/unit/application/exit_code_spec.rb18
1 files changed, 3 insertions, 15 deletions
diff --git a/spec/unit/application/exit_code_spec.rb b/spec/unit/application/exit_code_spec.rb
index 59ee400c23..5abf19fc02 100644
--- a/spec/unit/application/exit_code_spec.rb
+++ b/spec/unit/application/exit_code_spec.rb
@@ -77,11 +77,7 @@ describe Chef::Application::ExitCode do
end
it "writes a deprecation warning" do
- warn = "Chef RFC 062 (https://github.com/chef/chef-rfc/master/rfc062-exit-status.md) defines the" \
- " exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
- " In a future release, non-standard exit codes will be redefined as" \
- " GENERIC_FAILURE unless `exit_status` is set to `:disabled` in your client.rb."
- expect(Chef).to receive(:log_deprecation).with(warn)
+ expect(Chef).to receive(:deprecated).with(:exit_code, /^Chef RFC 062/)
expect(exit_codes.normalize_exit_code(151)).to eq(151)
end
@@ -118,11 +114,7 @@ describe Chef::Application::ExitCode do
end
it "does not write a deprecation warning" do
- warn = "Chef RFC 062 (https://github.com/chef/chef-rfc/master/rfc062-exit-status.md) defines the" \
- " exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
- " In a future release, non-standard exit codes will be redefined as" \
- " GENERIC_FAILURE unless `exit_status` is set to `:disabled` in your client.rb."
- expect(Chef).not_to receive(:log_deprecation).with(warn)
+ expect(Chef).not_to receive(:deprecated).with(:exit_code, /^Chef RFC 062/)
expect(exit_codes.normalize_exit_code(151)).to eq(151)
end
@@ -163,11 +155,7 @@ describe Chef::Application::ExitCode do
end
it "does write a deprecation warning" do
- warn = "Chef RFC 062 (https://github.com/chef/chef-rfc/master/rfc062-exit-status.md) defines the" \
- " exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
- " In a future release, non-standard exit codes will be redefined as" \
- " GENERIC_FAILURE unless `exit_status` is set to `:disabled` in your client.rb."
- expect(Chef).to receive(:log_deprecation).with(warn)
+ expect(Chef).to receive(:deprecated).with(:exit_code, /^Chef RFC 062/)
expect(exit_codes.normalize_exit_code(151)).to eq(1)
end