Skip to content

Commit

Permalink
(MODULES-444) Add specs for new behaviour
Browse files Browse the repository at this point in the history
`concat` can now take multiple arguments
  • Loading branch information
Peter Souter committed Dec 4, 2014
1 parent 4ebea40 commit ed192a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/functions/concat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@
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

0 comments on commit ed192a0

Please sign in to comment.