From da75bdfa7c067049b4be362fb2a6fad719e6fc3e Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Tue, 21 Mar 2017 10:52:20 +0000 Subject: Update alias spec error message expectation for PUP-7371 The fix for PUP-7371 adds the missing `Undef` into the error message being tested in type aliases specs, fixing the following failure against Puppet's master branch: test::string rejects other values [] should fail to compile and raise an error matching /parameter 'value' expects a String/ Failure/Error: it { is_expected.to compile.and_raise_error(/parameter 'value' expects a String/) } error during compilation: Evaluation Error: Error while evaluating a Resource Statement, Class[Test::String]: parameter 'value' expects a value of type Undef or String, got Array at line 2:1 on node example # ./spec/aliases/string_spec.rb:27:in `block (5 levels) in ' --- spec/aliases/string_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/aliases') diff --git a/spec/aliases/string_spec.rb b/spec/aliases/string_spec.rb index d8fb885..3ea1967 100644 --- a/spec/aliases/string_spec.rb +++ b/spec/aliases/string_spec.rb @@ -24,7 +24,7 @@ if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0 ].each do |value| describe value.inspect do let(:params) {{ value: value }} - it { is_expected.to compile.and_raise_error(/parameter 'value' expects a String/) } + it { is_expected.to compile.and_raise_error(/parameter 'value' expects a (?:value of type Undef or )?String/) } end end end -- cgit v1.2.3