We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 079afa5 + 30e994f commit ebec9deCopy full SHA for ebec9de
lib/puppet/parser/functions/pick.rb
@@ -21,7 +21,7 @@ module Puppet::Parser::Functions
21
args.delete(:undefined)
22
args.delete("")
23
if args[0].to_s.empty? then
24
- fail "Must provide non empty value."
+ fail Puppet::ParseError, "pick(): must receive at last one non empty value"
25
else
26
return args[0]
27
end
spec/unit/puppet/parser/functions/pick_spec.rb
@@ -29,6 +29,6 @@
29
30
31
it 'should error if no values are passed' do
32
- expect { scope.function_pick([]) }.to raise_error(Puppet::Error, /Must provide non empty value./)
+ expect { scope.function_pick([]) }.to( raise_error(Puppet::ParseError, "pick(): must receive at last one non empty value"))
33
34
0 commit comments