summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-04-25 14:57:20 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-04-25 14:57:20 -0700
commit82ad81d4bc7b58db06e649136a3e200e12bffca0 (patch)
tree4605ae9a1d3a00127210327f04ded8fafbd7c809
parentbc2d5fedc18d56c1b22700a28c07dda960010964 (diff)
downloadchef-82ad81d4bc7b58db06e649136a3e200e12bffca0.tar.gz
make deprecation warnings actual deprecation warnings
-rw-r--r--lib/chef/mixin/shell_out.rb2
-rw-r--r--spec/unit/mixin/shell_out_spec.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb
index f20e0b61cb..1f7deb21d2 100644
--- a/lib/chef/mixin/shell_out.rb
+++ b/lib/chef/mixin/shell_out.rb
@@ -88,7 +88,7 @@ class Chef
end
def deprecate_option(old_option, new_option)
- Chef::Log.logger.warn "DEPRECATION: Chef::Mixin::ShellOut option :#{old_option} is deprecated. Use :#{new_option}"
+ Chef.log_deprecation "DEPRECATION: Chef::Mixin::ShellOut option :#{old_option} is deprecated. Use :#{new_option}"
end
def io_for_live_stream
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index 2dedd7d364..191ea920c0 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -34,6 +34,10 @@ describe Chef::Mixin::ShellOut do
let!(:capture_log_output) { Chef::Log.logger = Logger.new(output) }
let(:assume_deprecation_log_level) { allow(Chef::Log).to receive(:level).and_return(:warn) }
+ before do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ end
+
context "without options" do
let(:command_args) { [ cmd ] }