diff options
-rw-r--r-- | lib/chef/mixin/shell_out.rb | 2 | ||||
-rw-r--r-- | spec/unit/mixin/shell_out_spec.rb | 4 |
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 ] } |