diff options
Diffstat (limited to 'spec/ruby/library/set/sortedset/equal_value_spec.rb')
-rw-r--r-- | spec/ruby/library/set/sortedset/equal_value_spec.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/ruby/library/set/sortedset/equal_value_spec.rb b/spec/ruby/library/set/sortedset/equal_value_spec.rb index cb1b7c9443..30422f5b95 100644 --- a/spec/ruby/library/set/sortedset/equal_value_spec.rb +++ b/spec/ruby/library/set/sortedset/equal_value_spec.rb @@ -1,13 +1,16 @@ require_relative '../../../spec_helper' -require 'set' -describe "SortedSet#==" do - it "returns true when the passed Object is a SortedSet and self and the Object contain the same elements" do - SortedSet[].should == SortedSet[] - SortedSet[1, 2, 3].should == SortedSet[1, 2, 3] - SortedSet["1", "2", "3"].should == SortedSet["1", "2", "3"] +ruby_version_is ""..."3.0" do + require 'set' - SortedSet[1, 2, 3].should_not == SortedSet[1.0, 2, 3] - SortedSet[1, 2, 3].should_not == [1, 2, 3] + describe "SortedSet#==" do + it "returns true when the passed Object is a SortedSet and self and the Object contain the same elements" do + SortedSet[].should == SortedSet[] + SortedSet[1, 2, 3].should == SortedSet[1, 2, 3] + SortedSet["1", "2", "3"].should == SortedSet["1", "2", "3"] + + SortedSet[1, 2, 3].should_not == SortedSet[1.0, 2, 3] + SortedSet[1, 2, 3].should_not == [1, 2, 3] + end end end |