X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fdifference_spec.rb;h=b30437e719c4e2092d052e76a6f9959d6beb8c20;hp=127e7b17354c61008d529eedc7d782e541faf27e;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/difference_spec.rb b/3rdparty/modules/stdlib/spec/functions/difference_spec.rb index 127e7b173..b30437e71 100644 --- a/3rdparty/modules/stdlib/spec/functions/difference_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/difference_spec.rb @@ -2,13 +2,12 @@ require 'spec_helper' describe 'difference' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params('one', []).and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params([], 'two').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params({}, {}).and_raise_error(Puppet::ParseError) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } + it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } + it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{Requires 2 arrays}) } + it { is_expected.to run.with_params('one', []).and_raise_error(Puppet::ParseError, %r{Requires 2 arrays}) } + it { is_expected.to run.with_params({}, {}).and_raise_error(Puppet::ParseError, %r{Requires 2 arrays}) } + it { is_expected.to run.with_params([], []).and_return([]) } it { is_expected.to run.with_params([], ['one']).and_return([]) } it { is_expected.to run.with_params(['one'], ['one']).and_return([]) }