summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDominic Cleal <dominic@cleal.org>2017-03-21 10:52:20 +0000
committerDominic Cleal <dominic@cleal.org>2017-03-21 10:54:06 +0000
commitda75bdfa7c067049b4be362fb2a6fad719e6fc3e (patch)
tree64a7022f753b358cf0a6d96504f45edc28bbf3ba /spec
parent60e9e0beb8f42937a03143b98dc9bcf51a5b6e2d (diff)
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 <top (required)>'
Diffstat (limited to 'spec')
-rw-r--r--spec/aliases/string_spec.rb2
1 files changed, 1 insertions, 1 deletions
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