Sha256: fd6bbebb480818f53d14ec86201287c8c80b582dde766666bc024bae1b224a48

Contents?: true

Size: 369 Bytes

Versions: 6

Compression:

Stored size: 369 Bytes

Contents

describe "Array#concat" do
  it "appends the elements in the other array" do
    ary = [1, 2, 3]
    ary.concat([9, 10, 11])
    ary.should == [1, 2, 3, 9, 10, 11]
    ary.concat []
    ary.should == [1, 2, 3, 9, 10, 11]
  end
  
  it "does not loop endlessly when argument is self" do
    ary = ["x", "y"]
    ary.concat(ary).should == ["x", "y", "x", "y"]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-0.3.2 gems/core/spec/core/array/concat_spec.rb
opal-0.3.1 gems/core/spec/core/array/concat_spec.rb
opal-0.3.0 gems/core/spec/core/array/concat_spec.rb
opal-0.2.2 opals/opal/opal/spec/core/array/concat_spec.rb
opal-0.2.0 opals/opal/opal/spec/core/array/concat_spec.rb
opal-0.1.0 opals/opal/spec/core/array/concat_spec.rb