diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-03-18 15:06:33 -0700 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-03-18 15:06:33 -0700 |
commit | 292490b0adefa9385a1940431f15332724f1c6b4 (patch) | |
tree | 3061368b4b386c0a0dc5ab0b5ac7c0f1aab2f547 /spec | |
parent | e0a2dc5b918482a5c05c0d7a6647f4e8a537616f (diff) | |
parent | c12d3d7d51da4107f5e0b63aacc4fcb2c5923a0b (diff) |
Merge branch '3.x' into 4.x
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/puppet/parser/functions/flatten_spec.rb | 4 |
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"])) |