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