]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(MODULES-444) Add specs for new behaviour
authorPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:12:55 +0000 (14:12 +0000)
committerPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:12:55 +0000 (14:12 +0000)
`concat` can now take multiple arguments

spec/functions/concat_spec.rb

index 49cb2ad7f048fc234c8131c71a196295b7985ed1..4a18cd9796007eaaa2a337cbc7f55e9fc822bcdf 100755 (executable)
@@ -32,4 +32,14 @@ describe "the concat function" do
     result = scope.function_concat([array_original,['4','5','6']])
     array_original.should(eq(['1','2','3']))
   end
+
+  it "should be able to concat multiple arrays" do
+    result = scope.function_concat([['1','2','3'],['4','5','6'],['7','8','9']])
+    expect(result).to(eq(['1','2','3','4','5','6','7','8','9']))
+  end
+
+  it "should be able to concat mix of primitives and arrays to a final array" do
+    result = scope.function_concat([['1','2','3'],'4',['5','6','7']])
+    expect(result).to(eq(['1','2','3','4','5','6','7']))
+  end
 end