X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fmember_spec.rb;h=861f6e5f8c823a9dfa268cc97a568d1a1e221831;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=8988632a253a7a6ac18e534d34a508d0bb6059f0;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/member_spec.rb b/3rdparty/modules/stdlib/spec/functions/member_spec.rb old mode 100755 new mode 100644 index 8988632a2..861f6e5f8 --- a/3rdparty/modules/stdlib/spec/functions/member_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/member_spec.rb @@ -2,11 +2,11 @@ require 'spec_helper' describe 'member' 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, /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([]).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_return(false) } it { is_expected.to run.with_params([], ['']).and_return(false) } @@ -17,6 +17,8 @@ describe 'member' do it { is_expected.to run.with_params(['one'], 'one').and_return(true) } it { is_expected.to run.with_params(['one'], ['one']).and_return(true) } it { is_expected.to run.with_params(['one', 'two', 'three', 'four'], ['four', 'two']).and_return(true) } + it { is_expected.to run.with_params([1, 2, 3, 4], [4, 2]).and_return(true) } + it { is_expected.to run.with_params([1, 'a', 'b', 4], [4, 'b']).and_return(true) } it { is_expected.to run.with_params(['ọאּẹ', 'ŧẅồ', 'ţҺŗęē', 'ƒơџŕ'], ['ƒơџŕ', 'ŧẅồ']).and_return(true) } it { is_expected.to run.with_params(['one', 'two', 'three', 'four'], ['four', 'five']).and_return(false) } it { is_expected.to run.with_params(['ọאּẹ', 'ŧẅồ', 'ţҺŗęē', 'ƒơџŕ'], ['ƒơџŕ', 'ƒί√ə']).and_return(false) }