Updated RubySpec source to d6754b35 except language/def_spec.rb.
[rbx.git] / spec / frozen / 1.8 / library / set / subtract_spec.rb
blob3aac8af951dce9c63cef683077c9b2fba423ec12
1 require File.dirname(__FILE__) + '/../../spec_helper'
2 require 'set'
4 describe "Set#subtract" do
5   before :each do
6     @set = Set[:a, :b, :c]
7   end
8   
9   it "deletes any elements contained in other and returns self" do
10     @set.subtract(Set[:b, :c]).should == @set
11     @set.should == Set[:a]
12   end
13   
14   it "accepts any enumerable as other" do
15     @set.subtract([:c]).should == Set[:a, :b]
16   end
17 end