Sha256: 31661140b9e7fdee6eee03d1d2f51176de522faf4c60b8e65f25e12d721bba70
Contents?: true
Size: 432 Bytes
Versions: 15
Compression:
Stored size: 432 Bytes
Contents
describe "Array#* with an integer" do it "concatenates n copies of the array when passed an integer" do ([1, 2, 3] * 0).should == [] ([1, 2, 3] * 1).should == [1, 2, 3] ([1, 2, 3] * 3).should == [1, 2, 3, 1, 2, 3, 1, 2, 3] end end describe "Array#* with a string" do it "returns a string formed by concatenating each element with separator" do ([1, 2, 3, 4, 5] * ' | ').should == "1 | 2 | 3 | 4 | 5" end end
Version data entries
15 entries across 15 versions & 1 rubygems