X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fempty_spec.rb;h=695c8a5adeba1b77a15b791d3b25a32acdfbbae8;hp=c6bf1e44aa8983a5a6c96cebd3f93e1fba5d45b9;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/empty_spec.rb b/3rdparty/modules/stdlib/spec/functions/empty_spec.rb index c6bf1e44a..695c8a5ad 100644 --- a/3rdparty/modules/stdlib/spec/functions/empty_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/empty_spec.rb @@ -2,11 +2,12 @@ require 'spec_helper' describe 'empty', :if => Puppet::Util::Package.versioncmp(Puppet.version, '5.5.0') < 0 do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } it { pending('Current implementation ignores parameters after the first.') is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError) } + it { is_expected.to run.with_params(false).and_raise_error(Puppet::ParseError, %r{Requires either array, hash, string or integer}) } it { is_expected.to run.with_params(0).and_return(false) } it { is_expected.to run.with_params('').and_return(true) } it { is_expected.to run.with_params('one').and_return(false) }