- [ {}, [], 1, true ].each do |invalid|
- it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError, /is not a string/) }
- it { is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first, invalid).and_raise_error(Puppet::ParseError, /is not a string/) }
+ [{}, [], 1, true].each do |invalid|
+ it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError, %r{is not a string}) }
+ it { is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first, invalid).and_raise_error(Puppet::ParseError, %r{is not a string}) }