X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Funique_spec.rb;h=1cdb93451f93649956fb63ee6069b5c79ca29474;hb=59812388abf4638d6065ffda934d1866af902302;hp=76932ecacbfa25dd1be4307441e593ac01987ead;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/unique_spec.rb b/3rdparty/modules/stdlib/spec/functions/unique_spec.rb old mode 100755 new mode 100644 index 76932ecac..1cdb93451 --- a/3rdparty/modules/stdlib/spec/functions/unique_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/unique_spec.rb @@ -4,14 +4,14 @@ describe 'unique' do if Puppet.version.to_f < 5.0 describe 'signature validation' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } it { - pending("Current implementation ignores parameters after the first.") - is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) + pending('Current implementation ignores parameters after the first.') + is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } - it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } - it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } - it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) } + it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } + it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } + it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work}) } end context 'when called with an array' do