Merge branch 'fix-pick-error-typo'
* fix-pick-error-typo: (Main) fix typo in pick error message Closes GH-197
This commit is contained in:
commit
ae4f52e9e5
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ EOS
|
|||
args.delete(:undefined)
|
||||
args.delete("")
|
||||
if args[0].to_s.empty? then
|
||||
fail Puppet::ParseError, "pick(): must receive at last one non empty value"
|
||||
fail Puppet::ParseError, "pick(): must receive at least one non empty value"
|
||||
else
|
||||
return args[0]
|
||||
end
|
||||
|
|
2
spec/unit/puppet/parser/functions/pick_spec.rb
Normal file → Executable file
2
spec/unit/puppet/parser/functions/pick_spec.rb
Normal file → Executable file
|
@ -29,6 +29,6 @@ describe "the pick function" do
|
|||
end
|
||||
|
||||
it 'should error if no values are passed' do
|
||||
expect { scope.function_pick([]) }.to( raise_error(Puppet::ParseError, "pick(): must receive at last one non empty value"))
|
||||
expect { scope.function_pick([]) }.to( raise_error(Puppet::ParseError, "pick(): must receive at least one non empty value"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue