Sha256: 976b1251d3e96849aa06d11d16f35b2f42f6f7852ee5541d64643fc822723acf

Contents?: true

Size: 359 Bytes

Versions: 23

Compression:

Stored size: 359 Bytes

Contents

describe "Array#+" do
  it "concatenates two arrays" do
    ([ 1, 2, 3 ] + [ 3, 4, 5 ] ).should == [1, 2, 3, 3, 4, 5]
    ([ 1, 2, 3 ] + []).should == [1, 2, 3]
    ([] + [ 1, 2, 3 ]).should == [1, 2, 3]
    ([] + []).should == []
  end

  it "can concatenate an array with itself" do
    ary = [1, 2, 3]
    (ary + ary).should == [1, 2, 3, 1, 2, 3]
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
opal-0.3.41 spec/core/array/plus_spec.rb
opal-0.3.40 spec/core/array/plus_spec.rb
opal-0.3.39 spec/core/array/plus_spec.rb
opal-0.3.38 spec/core/array/plus_spec.rb
opal-0.3.37 spec/core/array/plus_spec.rb
opal-0.3.36 spec/core/array/plus_spec.rb
opal-0.3.35 spec/core/array/plus_spec.rb
opal-0.3.34 spec/core/array/plus_spec.rb
opal-0.3.33 spec/core/array/plus_spec.rb
opal-0.3.32 spec/core/array/plus_spec.rb
opal-0.3.31 spec/core/array/plus_spec.rb
opal-0.3.30 spec/core/array/plus_spec.rb
opal-0.3.29 spec/core/array/plus_spec.rb
opal-0.3.28 spec/core/array/plus_spec.rb
opal-0.3.27 spec/core/array/plus_spec.rb
opal-0.3.26 spec/core/array/plus_spec.rb
opal-0.3.25 spec/core/array/plus_spec.rb
opal-0.3.22 spec/core/array/plus_spec.rb
opal-0.3.21 test/core/array/plus_spec.rb
opal-0.3.20 test/core/array/plus_spec.rb