puppetlabs-stdlib/spec
Leonardo Rodrigues de Mello 30e994fb6e enhanced the error message of pick function.
When pick function fail return a better error message like
the other stdlib functions, indicating that the error
is on function pick.

This would help people that see the error to identity it is
related to a incorrect use of stdlib function pick, instead of having
to grep all puppet libraries and manifests source for the old message.

I had also changed the spec test.

pick function change spec  as suggested GH-179

Fix the spec test to use expect {}.to instead of lambda {}.should
as explained by Adrienthebo.

"Using expect { }.to is preferred over lambda { }.should.
 In addition it's best practice to do a string match against the
error message to ensure that we're catching the right error,
instead of any error of the right type."

Also fixed a typo on the error message, it was missing one space.

pick function stylish fix as suggested on GH179
2013-09-16 10:03:20 -03:00
..
classes Add behavior example for anchor refresh propagation 2013-04-11 17:55:40 -07:00
functions (maint) Fix failing spec test with Puppet 3.3.0-rc2 2013-08-29 13:02:31 -07:00
monkey_patches puppet-lint cleanup 2012-11-15 10:38:03 -06:00
unit enhanced the error message of pick function. 2013-09-16 10:03:20 -03:00
spec.opts Copied function test scaffolding from puppet. 2011-06-29 12:25:43 +01:00
spec_helper.rb Revert "Revert "Merge branch '2.5.x' into 3.0.x"" 2012-10-25 15:44:14 -07:00
watchr.rb (Maint) Add watchr autotest script 2011-10-10 12:03:57 -07:00