From c4d84d49069dc0b2bcf834f5aec93ed9f7a65bcb Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 13 Apr 2017 16:36:59 -0700 Subject: (maint) Stdlib::Compat::Integer accepts numbers with newlines apparently --- spec/functions/is_integer_spec.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec/functions/is_integer_spec.rb') 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 -- cgit v1.2.3