diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-03-18 15:06:07 -0700 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-03-18 15:06:07 -0700 |
commit | c12d3d7d51da4107f5e0b63aacc4fcb2c5923a0b (patch) | |
tree | 70aa214ad4e4f8532347a8bff1ca9484e1ed288e /spec/unit | |
parent | 4fdefd07617a23797ada6aa0eb1a5dadd5b9bd43 (diff) | |
parent | 967f9916d16ea4f5a8557c9c66ddb878872337ca (diff) | |
download | puppet-stdlib-c12d3d7d51da4107f5e0b63aacc4fcb2c5923a0b.tar.gz puppet-stdlib-c12d3d7d51da4107f5e0b63aacc4fcb2c5923a0b.tar.bz2 |
Merge branch '2.x' into 3.x
Diffstat (limited to 'spec/unit')
-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"])) |