(MODULES-444) Add specs for new behaviour

`concat` can now take multiple arguments
This commit is contained in:
Peter Souter 2014-12-04 14:12:55 +00:00
parent 4ebea40e08
commit ed192a0464

View file

@ -32,4 +32,14 @@ describe "the concat function" do
result = scope.function_concat([array_original,['4','5','6']]) result = scope.function_concat([array_original,['4','5','6']])
array_original.should(eq(['1','2','3'])) array_original.should(eq(['1','2','3']))
end 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 end