X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fdig44_spec.rb;h=e7c6d817c101fd7084da7ec68de68e57233702c2;hp=2a9252cfeedd85946b7d3be8b0151607c6f43854;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/dig44_spec.rb b/3rdparty/modules/stdlib/spec/functions/dig44_spec.rb index 2a9252cfe..e7c6d817c 100644 --- a/3rdparty/modules/stdlib/spec/functions/dig44_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/dig44_spec.rb @@ -46,15 +46,15 @@ describe 'dig44' do end it 'requires two arguments' do - is_expected.to run.with_params.and_raise_error(ArgumentError) + is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Wrong number of arguments}) end it 'fails if the data is not a structure' do - is_expected.to run.with_params('test', []).and_raise_error(Puppet::Error) + is_expected.to run.with_params('test', []).and_raise_error(Puppet::Error, %r{first argument must be a hash or an array}) end it 'fails if the path is not an array' do - is_expected.to run.with_params({}, '').and_raise_error(Puppet::Error) + is_expected.to run.with_params({}, '').and_raise_error(Puppet::Error, %r{second argument must be an array}) end it 'returns the value if the value is string' do