X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fdelete_spec.rb;h=df5ee7a404440698b03279a023d9bf73ca9539f9;hp=df9ad52be2287c89c0556238edfd683540d65ffb;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/delete_spec.rb b/3rdparty/modules/stdlib/spec/functions/delete_spec.rb index df9ad52be..df5ee7a40 100644 --- a/3rdparty/modules/stdlib/spec/functions/delete_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/delete_spec.rb @@ -2,11 +2,11 @@ require 'spec_helper' describe 'delete' 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([]).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([]).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } it { is_expected.to run.with_params([], 'two') } - it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError) } + it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } + it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError, %r{First argument must be an Array, String, or Hash}) } describe 'deleting from an array' do it { is_expected.to run.with_params([], '').and_return([]) }