From 39148468abbd9b8af74b776eb49f0a8388fc8541 Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Mon, 15 Aug 2016 10:39:50 +0100 Subject: (maint) Switch 3.x deprecation() to use Puppet warning logger The deprecation function was calling the `Kernel#warn` function which prints to stderr, rather than the Puppet logger. This causes problems for Puppet module tests on Travis CI, which has a cap on the amount of stdout/err permitted in its logs and also prevents users from finding the deprecation warnings when running under a Puppet master. --- spec/functions/validate_array_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/functions/validate_array_spec.rb') diff --git a/spec/functions/validate_array_spec.rb b/spec/functions/validate_array_spec.rb index 0ba7108..9f2e210 100755 --- a/spec/functions/validate_array_spec.rb +++ b/spec/functions/validate_array_spec.rb @@ -5,7 +5,7 @@ describe 'validate_array' do it { is_expected.not_to eq(nil) } # Checking for deprecation warning it 'should display a single deprecation' do - scope.expects(:warn).with(includes('This method is deprecated')) + scope.expects(:warning).with(includes('This method is deprecated')) is_expected.to run.with_params([]) end it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } -- cgit v1.2.3