summaryrefslogtreecommitdiff
path: root/spec/functions
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2017-07-07 17:16:46 +0100
committerGitHub <noreply@github.com>2017-07-07 17:16:46 +0100
commit4c1b51c8fea9cec416c21dbd8b0c6222b5a1ce71 (patch)
tree3f313e483297a3ecf0c04b2ff81fb675e36172e8 /spec/functions
parent0001566cb17e0dd40c7a8a88507641aed96a8fa8 (diff)
parentc4d84d49069dc0b2bcf834f5aec93ed9f7a65bcb (diff)
Merge pull request #756 from hunner/newline_integers
(maint) Stdlib::Compat::Integer accepts numbers with newlines apparently
Diffstat (limited to 'spec/functions')
-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