X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fsort_spec.rb;h=a9bdea3ce37b0136e0673e1060e8478cdd483d12;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=9abd039c13e7fd0e5bdcc62d35983be590bb8143;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/sort_spec.rb b/3rdparty/modules/stdlib/spec/functions/sort_spec.rb old mode 100755 new mode 100644 index 9abd039c1..a9bdea3ce --- a/3rdparty/modules/stdlib/spec/functions/sort_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/sort_spec.rb @@ -1,13 +1,22 @@ require 'spec_helper' -describe 'sort' do +describe 'sort', :if => Puppet::Util::Package.versioncmp(Puppet.version, '6.0.0') < 0 do 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([], 'extra').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } - it { pending('stricter input checking'); is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /requires string or array/) } - it { pending('stricter input checking'); is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /requires string or array/) } - it { pending('stricter input checking'); is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /requires string or array/) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { + pending('stricter input checking') + is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{requires string or array}) + } + it { + pending('stricter input checking') + is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{requires string or array}) + } + it { + pending('stricter input checking') + is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, %r{requires string or array}) + } end context 'when called with an array' do