summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/type_spec.rb
diff options
context:
space:
mode:
authorKen Barber <ken@bob.sh>2011-07-29 22:18:56 +0100
committerKen Barber <ken@bob.sh>2011-07-29 22:18:56 +0100
commit19313b43ea04066a88a0b78e83650ac52785e2e9 (patch)
tree15c8e5de95a4ffa297683a1bdab0d45a1bfb97eb /spec/unit/parser/functions/type_spec.rb
parentf9634b7f9b03be86e25dc740cdcda754a0d2bf7d (diff)
(#3) Apply missing documentation to more functions.
Diffstat (limited to 'spec/unit/parser/functions/type_spec.rb')
-rw-r--r--spec/unit/parser/functions/type_spec.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/spec/unit/parser/functions/type_spec.rb b/spec/unit/parser/functions/type_spec.rb
index 36c3823..53071f3 100644
--- a/spec/unit/parser/functions/type_spec.rb
+++ b/spec/unit/parser/functions/type_spec.rb
@@ -18,19 +18,29 @@ describe "the type function" do
lambda { @scope.function_type([]) }.should( raise_error(Puppet::ParseError))
end
- it "should return String when given a string" do
+ it "should return string when given a string" do
result = @scope.function_type(["aaabbbbcccc"])
- result.should(eq('String'))
+ result.should(eq('string'))
end
- it "should return Array when given an array" do
+ it "should return array when given an array" do
result = @scope.function_type([["aaabbbbcccc","asdf"]])
- result.should(eq('Array'))
+ result.should(eq('array'))
end
- it "should return Hash when given a hash" do
+ it "should return hash when given a hash" do
result = @scope.function_type([{"a"=>1,"b"=>2}])
- result.should(eq('Hash'))
+ result.should(eq('hash'))
+ end
+
+ it "should return integer when given an integer" do
+ result = @scope.function_type(["1"])
+ result.should(eq('integer'))
+ end
+
+ it "should return float when given a float" do
+ result = @scope.function_type(["1.34"])
+ result.should(eq('float'))
end
end