diff options
author | David Schmitt <david.schmitt@puppet.com> | 2016-08-08 16:15:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-08 16:15:21 +0100 |
commit | e39fe01ea01719b97110341cacc4b4e2784a7d1a (patch) | |
tree | 620b3c0889386c88d0731f0b958f622d0b4d1bac /spec/functions/is_float_spec.rb | |
parent | 2bf9187cf8971fad35b0ffebf7c49963ba35c850 (diff) | |
parent | 6e7e69fe203e042b28aacb01301c338d55448c5f (diff) |
Merge pull request #629 from tphoney/MODULES-3533
(modules-3533) deprecation for 3.x number function
Diffstat (limited to 'spec/functions/is_float_spec.rb')
-rwxr-xr-x | spec/functions/is_float_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/functions/is_float_spec.rb b/spec/functions/is_float_spec.rb index ffff971..267d9c6 100755 --- a/spec/functions/is_float_spec.rb +++ b/spec/functions/is_float_spec.rb @@ -2,6 +2,13 @@ require 'spec_helper' describe 'is_float' 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')) + is_expected.to run.with_params(3) + end + it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } it { is_expected.to run.with_params(0.1, 0.2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } |