Sha256: fc1f6b1421d811a83ea29bae1cc09fef01b3fe523db5ee888ca6573fbfb5d805

Contents?: true

Size: 600 Bytes

Versions: 3

Compression:

Stored size: 600 Bytes

Contents

describe :sorted_set_intersection, :shared => true do
  before :each do
    @set = SortedSet["a", "b", "c"]
  end

  it "returns a new SortedSet containing only elements shared by self and the passed Enumerable" do
    @set.send(@method, SortedSet["b", "c", "d", "e"]).should == SortedSet["b", "c"]
    @set.send(@method, ["b", "c", "d"]).should == SortedSet["b", "c"]
  end

  it "raises an ArgumentError when passed a non-Enumerable" do
    lambda { @set.send(@method, 1) }.should raise_error(NoMethodError)
    lambda { @set.send(@method, Object.new) }.should raise_error(NoMethodError)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rhodes-3.2.0.beta.4 spec/framework_spec/app/spec/library/set/sortedset/shared/intersection.rb
rhodes-3.2.0.beta.2 spec/framework_spec/app/spec/library/set/sortedset/shared/intersection.rb
rhodes-3.2.0.beta.1 spec/framework_spec/app/spec/library/set/sortedset/shared/intersection.rb