Skip to content

Commit ed192a0

Browse files
author
Peter Souter
committed
(MODULES-444) Add specs for new behaviour
`concat` can now take multiple arguments
1 parent 4ebea40 commit ed192a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/functions/concat_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,14 @@
3232
result = scope.function_concat([array_original,['4','5','6']])
3333
array_original.should(eq(['1','2','3']))
3434
end
35+
36+
it "should be able to concat multiple arrays" do
37+
result = scope.function_concat([['1','2','3'],['4','5','6'],['7','8','9']])
38+
expect(result).to(eq(['1','2','3','4','5','6','7','8','9']))
39+
end
40+
41+
it "should be able to concat mix of primitives and arrays to a final array" do
42+
result = scope.function_concat([['1','2','3'],'4',['5','6','7']])
43+
expect(result).to(eq(['1','2','3','4','5','6','7']))
44+
end
3545
end

0 commit comments

Comments
 (0)