summaryrefslogtreecommitdiff
path: root/spec/functions/is_integer_spec.rb
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppet.com>2017-04-13 16:36:59 -0700
committerHunter Haugen <hunter@puppet.com>2017-04-14 11:46:24 -0700
commitc4d84d49069dc0b2bcf834f5aec93ed9f7a65bcb (patch)
treef4567ea058124c032c32a760d42fbd2bd38497ee /spec/functions/is_integer_spec.rb
parentb7af918d11f108c0ad9add9e365bf8da0c3bcdc4 (diff)
(maint) Stdlib::Compat::Integer accepts numbers with newlines apparently
Diffstat (limited to 'spec/functions/is_integer_spec.rb')
-rwxr-xr-xspec/functions/is_integer_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/functions/is_integer_spec.rb b/spec/functions/is_integer_spec.rb
index b296830..8118ef4 100755
--- a/spec/functions/is_integer_spec.rb
+++ b/spec/functions/is_integer_spec.rb
@@ -11,6 +11,8 @@ describe 'is_integer' do
it { is_expected.to run.with_params('3').and_return(true) }
it { is_expected.to run.with_params(-3).and_return(true) }
it { is_expected.to run.with_params('-3').and_return(true) }
+ it { is_expected.to run.with_params("123\nfoo").and_return(true) }
+ it { is_expected.to run.with_params("foo\n123").and_return(true) }
it { is_expected.to run.with_params(3.7).and_return(false) }
it { is_expected.to run.with_params('3.7').and_return(false) }
@@ -24,6 +26,7 @@ describe 'is_integer' do
it { is_expected.to run.with_params(true).and_return(false) }
it { is_expected.to run.with_params(false).and_return(false) }
it { is_expected.to run.with_params('0001234').and_return(false) }
+ it { is_expected.to run.with_params("foo\nbar").and_return(false) }
context 'Checking for deprecation warning' do
after(:all) do