summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb')
-rw-r--r--code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb b/code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb
new file mode 100644
index 0000000..3ef061d
--- /dev/null
+++ b/code/environments/production/modules/stdlib/spec/functions/is_hash_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe 'is_hash' do
+ it { is_expected.not_to eq(nil) }
+ it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
+ it { is_expected.to run.with_params({}, {}).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
+ it { is_expected.to run.with_params('').and_return(false) }
+ it { is_expected.to run.with_params({}).and_return(true) }
+ it { is_expected.to run.with_params([]).and_return(false) }
+ it { is_expected.to run.with_params(1).and_return(false) }
+end