1require_relative '../../../spec_helper' 2require 'set' 3 4describe "SortedSet#subtract" do 5 before :each do 6 @set = SortedSet["a", "b", "c"] 7 end 8 9 it "deletes any elements contained in other and returns self" do 10 @set.subtract(SortedSet["b", "c"]).should == @set 11 @set.should == SortedSet["a"] 12 end 13 14 it "accepts any enumerable as other" do 15 @set.subtract(["c"]).should == SortedSet["a", "b"] 16 end 17end 18