Sha256: d671d774bdc9448d886e5ea7f8c7bc4350a10c694607c13b4a81fbaa29cc46ad
Contents?: true
Size: 459 Bytes
Versions: 3
Compression:
Stored size: 459 Bytes
Contents
require "spec_helper" require "hamster/list" describe Hamster::List do describe "#<<" do it "adds an item onto the end of a list" do list = L["a", "b"] (list << "c").should eql(L["a", "b", "c"]) list.should eql(L["a", "b"]) end context "on an empty list" do it "returns a list with one item" do list = L.empty (list << "c").should eql(L["c"]) list.should eql(L.empty) end end end end
Version data entries
3 entries across 3 versions & 2 rubygems