diff options
author | tphoney <tp@puppet.com> | 2016-08-03 17:06:25 +0100 |
---|---|---|
committer | tphoney <tp@puppet.com> | 2016-08-08 15:02:25 +0100 |
commit | 6e7e69fe203e042b28aacb01301c338d55448c5f (patch) | |
tree | 8250e2fed853d18036e9e3121454a7c1362b2064 /spec/functions/deprecation_spec.rb | |
parent | 16a26f6ab40a4b1d7e6836ff6de24850f0b8fb35 (diff) |
(modules-3533) deprecation for 3.x number function
Diffstat (limited to 'spec/functions/deprecation_spec.rb')
-rw-r--r-- | spec/functions/deprecation_spec.rb | 18 |
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 |