summaryrefslogtreecommitdiff
path: root/spec/functions/is_integer_spec.rb
diff options
context:
space:
mode:
authortphoney <tp@puppet.com>2016-08-03 17:06:25 +0100
committertphoney <tp@puppet.com>2016-08-08 15:02:25 +0100
commit6e7e69fe203e042b28aacb01301c338d55448c5f (patch)
tree8250e2fed853d18036e9e3121454a7c1362b2064 /spec/functions/is_integer_spec.rb
parent16a26f6ab40a4b1d7e6836ff6de24850f0b8fb35 (diff)
(modules-3533) deprecation for 3.x number function
Diffstat (limited to 'spec/functions/is_integer_spec.rb')
-rwxr-xr-xspec/functions/is_integer_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/functions/is_integer_spec.rb b/spec/functions/is_integer_spec.rb
index 67263c1..49550c7 100755
--- a/spec/functions/is_integer_spec.rb
+++ b/spec/functions/is_integer_spec.rb
@@ -2,6 +2,13 @@ require 'spec_helper'
describe 'is_integer' 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(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }