summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/type_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/functions/type_spec.rb')
-rw-r--r--spec/unit/parser/functions/type_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/unit/parser/functions/type_spec.rb b/spec/unit/parser/functions/type_spec.rb
index fddb87d..36c3823 100644
--- a/spec/unit/parser/functions/type_spec.rb
+++ b/spec/unit/parser/functions/type_spec.rb
@@ -18,9 +18,19 @@ describe "the type function" do
lambda { @scope.function_type([]) }.should( raise_error(Puppet::ParseError))
end
- it "should return a type when given a string" do
+ it "should return String when given a string" do
result = @scope.function_type(["aaabbbbcccc"])
result.should(eq('String'))
end
+ it "should return Array when given an array" do
+ result = @scope.function_type([["aaabbbbcccc","asdf"]])
+ result.should(eq('Array'))
+ end
+
+ it "should return Hash when given a hash" do
+ result = @scope.function_type([{"a"=>1,"b"=>2}])
+ result.should(eq('Hash'))
+ end
+
end