Sha256: b461161ab8047c8ac2ee3b1790206d71b48c1cc420e516278e844753afa53382
Contents?: true
Size: 372 Bytes
Versions: 3
Compression:
Stored size: 372 Bytes
Contents
describe "Array#clear" do it "removes all elements" do a = [1, 2, 3, 4] a.clear # # a.clear.should == a a.should == [] end it "returns self" do a = [1] oid = a.object_id a.clear.object_id.should == oid end it "leaves the Array empty" do a = [1] a.clear a.empty?.should == true a.size.should == 0 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opal-0.3.2 | gems/core/spec/core/array/clear_spec.rb |
opal-0.3.1 | gems/core/spec/core/array/clear_spec.rb |
opal-0.3.0 | gems/core/spec/core/array/clear_spec.rb |