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