summaryrefslogtreecommitdiff
path: root/spec/functions/deprecation_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functions/deprecation_spec.rb')
-rw-r--r--spec/functions/deprecation_spec.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/functions/deprecation_spec.rb b/spec/functions/deprecation_spec.rb
index bbabe48..a596e24 100644
--- a/spec/functions/deprecation_spec.rb
+++ b/spec/functions/deprecation_spec.rb
@@ -1,13 +1,5 @@
require 'spec_helper'
-if ENV["FUTURE_PARSER"] == 'yes'
- describe 'deprecation' do
- pending 'teach rspec-puppet to load future-only functions under 3.7.5' do
- it { is_expected.not_to eq(nil) }
- end
- end
-end
-
if Puppet.version.to_f >= 4.0
describe 'deprecation' do
before(:each) {
@@ -48,4 +40,14 @@ if Puppet.version.to_f >= 4.0
Puppet.settings[:strict] = :warning
}
end
+else
+ describe 'deprecation' do
+ it { is_expected.not_to eq(nil) }
+ it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
+
+ it 'should display a single warning' do
+ scope.expects(:warn).with(includes('heelo'))
+ is_expected.to run.with_params('key', 'heelo')
+ end
+ end
end