summaryrefslogtreecommitdiff
path: root/spec/functions/ensure_resource_spec.rb
diff options
context:
space:
mode:
authorDan Bode <dan@puppetlabs.com>2012-08-13 18:52:00 -0700
committerDan Bode <dan@puppetlabs.com>2012-08-13 18:52:00 -0700
commitfe85f467c8f8e65c9fd09acff17ac4adb80f12b8 (patch)
treea7b91740aaf5563b8ee06e00dcdc01df060a2a3c /spec/functions/ensure_resource_spec.rb
parentba789deac588dea83a129544f8aa00813db30bf0 (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/ensure_resource_spec.rb')
-rw-r--r--spec/functions/ensure_resource_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/functions/ensure_resource_spec.rb b/spec/functions/ensure_resource_spec.rb
index e45a6d0..e03efda 100644
--- a/spec/functions/ensure_resource_spec.rb
+++ b/spec/functions/ensure_resource_spec.rb
@@ -26,6 +26,7 @@ describe 'ensure_resource' do
it do
# these first three should not fail
should run.with_params('User', 'dan', {})
+ should run.with_params('User', 'dan', '')
should run.with_params('User', 'dan', {'ensure' => 'present'})
should run.with_params('User', 'dan', {'ensure' => 'present', 'managehome' => false})
# test that this fails