Sha256: c047117e81b8f5ef8595ab5e8bcd28e1af07f399bef1e4a46ad49376e4e41ef4
Contents?: true
Size: 873 Bytes
Versions: 8
Compression:
Stored size: 873 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'hamster/set' describe Hamster::Set do describe "#remove" do before do @original = Hamster.set("A", "B", "C") end describe "with an existing value" do before do @result = @original.remove("B") end it "preserves the original" do @original.should == Hamster.set("A", "B", "C") end it "returns a copy with the remaining of values" do @result.should == Hamster.set("A", "C") end end describe "with a non-existing value" do before do @result = @original.remove("D") end it "preserves the original values" do @original.should == Hamster.set("A", "B", "C") end it "returns self" do @result.should equal(@original) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems