summaryrefslogtreecommitdiff
path: root/spec/aliases
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/aliases
parentb7af918d11f108c0ad9add9e365bf8da0c3bcdc4 (diff)
(maint) Stdlib::Compat::Integer accepts numbers with newlines apparently
Diffstat (limited to 'spec/aliases')
-rw-r--r--spec/aliases/integer_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/aliases/integer_spec.rb b/spec/aliases/integer_spec.rb
index bd00c2a..8cb4658 100644
--- a/spec/aliases/integer_spec.rb
+++ b/spec/aliases/integer_spec.rb
@@ -8,6 +8,8 @@ if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
'3',
-3,
'-3',
+ "123\nfoo",
+ "foo\n123",
].each do |value|
describe value.inspect do
let(:params) {{ value: value }}
@@ -17,7 +19,7 @@ if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
end
describe 'rejects other values' do
- [ true, 'true', false, 'false', 'iAmAString', '1test', '1 test', 'test 1', 'test 1 test', {}, { 'key' => 'value' }, { 1=> 2 }, '', :undef , 'x', 3.7, '3.7',-3.7, '-342.2315e-12' ].each do |value|
+ [ "foo\nbar", true, 'true', false, 'false', 'iAmAString', '1test', '1 test', 'test 1', 'test 1 test', {}, { 'key' => 'value' }, { 1=> 2 }, '', :undef , 'x', 3.7, '3.7',-3.7, '-342.2315e-12' ].each do |value|
describe value.inspect do
let(:params) {{ value: value }}
it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value of type Integer, Pattern(\[.*\]+)?, or Array/) }