X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fdelete_values_spec.rb;h=3ee3af13cd6795827b6dc6eb7377d31ce3c2cdcf;hp=fdd8ac4df3fee6be65d164f92e63496f08ae21e4;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/delete_values_spec.rb b/3rdparty/modules/stdlib/spec/functions/delete_values_spec.rb index fdd8ac4df..3ee3af13c 100644 --- a/3rdparty/modules/stdlib/spec/functions/delete_values_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/delete_values_spec.rb @@ -2,14 +2,14 @@ require 'spec_helper' describe 'delete_values' 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(1).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', 'three').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(1).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', 'three').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) } describe 'when the first argument is not a hash' do - it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError) } - it { is_expected.to run.with_params('one', 'two').and_raise_error(TypeError) } - it { is_expected.to run.with_params([], 'two').and_raise_error(TypeError) } + it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError, %r{First argument must be a Hash}) } + it { is_expected.to run.with_params('one', 'two').and_raise_error(TypeError, %r{First argument must be a Hash}) } + it { is_expected.to run.with_params([], 'two').and_raise_error(TypeError, %r{First argument must be a Hash}) } end describe 'when deleting from a hash' do