Skip to content

Commit

Permalink
add spec for SortedSet being extracted from the set library
Browse files Browse the repository at this point in the history
  • Loading branch information
lxxxvi authored and eregon committed Oct 11, 2021
1 parent 812bc59 commit 96a4617
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions library/set/sortedset/new_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require_relative '../../../spec_helper'
require 'set'

ruby_version_is "3.0" do
describe "SortedSet.new" do
it "throws error including message that it has been extracted" do
-> {
SortedSet.new
}.should raise_error(RuntimeError) { |e|
e.message.should.include?("The `SortedSet` class has been extracted from the `set` library")
}
end
end
end

ruby_version_is ""..."3.0" do
describe "SortedSet.new" do
it "returns an instance of SortedSet" do
SortedSet.new.should be_an_instance_of(SortedSet)
end
end
end

0 comments on commit 96a4617

Please sign in to comment.