Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / functions / delete_regex_spec.rb
index ff21d31..8e16b0b 100644 (file)
@@ -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([]) }