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:
Josh Cooper 2013-10-29 12:01:39 -07:00
commit ae4f52e9e5
2 changed files with 2 additions and 2 deletions

View file

@ -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
View 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