summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/parser
diff options
context:
space:
mode:
authorAdrien Thebo <git@somethingsinistral.net>2013-03-18 15:05:23 -0700
committerAdrien Thebo <git@somethingsinistral.net>2013-03-18 15:05:23 -0700
commit967f9916d16ea4f5a8557c9c66ddb878872337ca (patch)
treee20db53336a3034205263d09d7f6bbf0eec1df2e /spec/unit/puppet/parser
parent1e2ee5bd01b85258548bb7c0aabe4ce0938b2560 (diff)
parente80207bede37e498c32bea6d56c46f1dd709721e (diff)
Merge branch 'pull-98' into 2.x
Diffstat (limited to 'spec/unit/puppet/parser')
-rwxr-xr-xspec/unit/puppet/parser/functions/flatten_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/puppet/parser/functions/flatten_spec.rb b/spec/unit/puppet/parser/functions/flatten_spec.rb
index d4dfd20..dba7a6b 100755
--- a/spec/unit/puppet/parser/functions/flatten_spec.rb
+++ b/spec/unit/puppet/parser/functions/flatten_spec.rb
@@ -11,6 +11,10 @@ describe "the flatten function" do
lambda { scope.function_flatten([]) }.should( raise_error(Puppet::ParseError))
end
+ it "should raise a ParseError if there is more than 1 argument" do
+ lambda { scope.function_flatten([[], []]) }.should( raise_error(Puppet::ParseError))
+ end
+
it "should flatten a complex data structure" do
result = scope.function_flatten([["a","b",["c",["d","e"],"f","g"]]])
result.should(eq(["a","b","c","d","e","f","g"]))