diff options
author | Dan Bode <dan@puppetlabs.com> | 2012-08-13 18:52:00 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 10:54:33 -0700 |
commit | 4f8b133917255451b1f28128e26b36305c23d254 (patch) | |
tree | c23e7f7bbcf72e3ea17fb333f174cbf6fd4f73fe /spec/functions/defined_with_params_spec.rb | |
parent | a0cb8cdee42125c7acd64f17af603a2fa9375863 (diff) |
Handle undef for parameter argument
This commit adds better handling of the case where
undef is passed as the parameter value.
This works by converting '' into []
Diffstat (limited to 'spec/functions/defined_with_params_spec.rb')
-rw-r--r-- | spec/functions/defined_with_params_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/functions/defined_with_params_spec.rb b/spec/functions/defined_with_params_spec.rb index 21c08a0..f995b67 100644 --- a/spec/functions/defined_with_params_spec.rb +++ b/spec/functions/defined_with_params_spec.rb @@ -26,6 +26,7 @@ describe 'defined_with_params' do should run.with_params('User[dan]', {'ensure' => 'present'}).and_return(true) should run.with_params('User[dan]', {'ensure' => 'present', 'managehome' => false}).and_return(true) should run.with_params('User[dan]', {'ensure' => 'absent', 'managehome' => false}).and_return(false) + should run.with_params('User[dan]', '').and_return(true) end end end |