X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fdelete_regex_spec.rb;h=8e16b0b3de03a7dc4c17863ab0160767a1ef9966;hp=ff21d310c2712a6a55c898bc3216b2f0f7872100;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/spec/functions/delete_regex_spec.rb b/3rdparty/modules/stdlib/spec/functions/delete_regex_spec.rb index ff21d310c..8e16b0b3d 100644 --- a/3rdparty/modules/stdlib/spec/functions/delete_regex_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/delete_regex_spec.rb @@ -2,13 +2,12 @@ require 'spec_helper' describe 'delete_regex' 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') } - it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError) } - it { is_expected.to run.with_params([], 'two', 'three', 'four').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, Hash, or String}) } describe 'deleting from an array' do it { is_expected.to run.with_params([], '').and_return([]) }