1 require File.dirname(__FILE__) + '/../../../spec_helper'
4 describe "SortedSet#delete" do
6 @set = SortedSet["a", "b", "c"]
9 it "deletes the passed Object from self" do
11 @set.should_not include("a")
15 @set.delete("a").should equal(@set)
16 @set.delete("x").should equal(@set)
20 describe "SortedSet#delete?" do
22 @set = SortedSet["a", "b", "c"]
25 it "deletes the passed Object from self" do
27 @set.should_not include("a")
30 it "returns self when the passed Object is in self" do
31 @set.delete?("a").should equal(@set)
34 it "returns nil when the passed Object is not in self" do
35 @set.delete?("x").should be_nil