X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fmin_spec.rb;h=34efb67b5e023e3102d6bad1d929b8ae1e747980;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=c840a72c9065601a5b10906d12b1f82bfd423bcb;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/min_spec.rb b/3rdparty/modules/stdlib/spec/functions/min_spec.rb old mode 100755 new mode 100644 index c840a72c9..34efb67b5 --- a/3rdparty/modules/stdlib/spec/functions/min_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/min_spec.rb @@ -1,16 +1,18 @@ require 'spec_helper' -describe 'min' do +describe 'min', :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 { is_expected.to run.with_params(1).and_return(1) } it { is_expected.to run.with_params(1, 2).and_return(1) } it { is_expected.to run.with_params(1, 2, 3).and_return(1) } it { is_expected.to run.with_params(3, 2, 1).and_return(1) } + it { is_expected.to run.with_params(12, 8).and_return(8) } it { is_expected.to run.with_params('one').and_return('one') } it { is_expected.to run.with_params('one', 'two').and_return('one') } it { is_expected.to run.with_params('one', 'two', 'three').and_return('one') } it { is_expected.to run.with_params('three', 'two', 'one').and_return('one') } + it { is_expected.to run.with_params('the', 'public', 'art', 'galleries').and_return('art') } describe 'implementation artifacts' do it { is_expected.to run.with_params(1, 'one').and_return(1) }