summaryrefslogtreecommitdiff
path: root/spec/functions/is_integer_spec.rb
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppet.com>2016-08-08 16:15:21 +0100
committerGitHub <noreply@github.com>2016-08-08 16:15:21 +0100
commite39fe01ea01719b97110341cacc4b4e2784a7d1a (patch)
tree620b3c0889386c88d0731f0b958f622d0b4d1bac /spec/functions/is_integer_spec.rb
parent2bf9187cf8971fad35b0ffebf7c49963ba35c850 (diff)
parent6e7e69fe203e042b28aacb01301c338d55448c5f (diff)
Merge pull request #629 from tphoney/MODULES-3533
(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) }