X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Frstrip_spec.rb;h=60776d8950330f342e2829efac133ef1b523ca56;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=a7663e21d02304f2fda72216b5bbbb92039593ad;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/rstrip_spec.rb b/3rdparty/modules/stdlib/spec/functions/rstrip_spec.rb old mode 100755 new mode 100644 index a7663e21d..60776d895 --- a/3rdparty/modules/stdlib/spec/functions/rstrip_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/rstrip_spec.rb @@ -1,14 +1,14 @@ require 'spec_helper' -describe 'rstrip' do +describe 'rstrip', :if => Puppet::Util::Package.versioncmp(Puppet.version, '6.0.0') < 0 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('', '').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) + pending('Current implementation ignores parameters after the first.') + is_expected.to run.with_params('', '').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 with/) } - it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /Requires either array or string to work with/) } + it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work with}) } + it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work with}) } it { is_expected.to run.with_params('').and_return('') } it { is_expected.to run.with_params(' ').and_return('') } it { is_expected.to run.with_params(' ').and_return('') }