aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/set/sortedset/constructor_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/set/sortedset/constructor_spec.rb')
-rw-r--r--spec/ruby/library/set/sortedset/constructor_spec.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/ruby/library/set/sortedset/constructor_spec.rb b/spec/ruby/library/set/sortedset/constructor_spec.rb
index 953144dbdb..31f30fd892 100644
--- a/spec/ruby/library/set/sortedset/constructor_spec.rb
+++ b/spec/ruby/library/set/sortedset/constructor_spec.rb
@@ -1,15 +1,18 @@
require_relative '../../../spec_helper'
-require 'set'
-describe "SortedSet[]" do
- it "returns a new SortedSet populated with the passed Objects" do
- set = SortedSet[1, 2, 3]
+ruby_version_is ""..."3.0" do
+ require 'set'
- set.instance_of?(SortedSet).should be_true
- set.size.should eql(3)
+ describe "SortedSet[]" do
+ it "returns a new SortedSet populated with the passed Objects" do
+ set = SortedSet[1, 2, 3]
- set.should include(1)
- set.should include(2)
- set.should include(3)
+ set.instance_of?(SortedSet).should be_true
+ set.size.should eql(3)
+
+ set.should include(1)
+ set.should include(2)
+ set.should include(3)
+ end
end
end