-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2235 from herwinw/queue_freeze
Import upstream specs of Queue#freeze
- Loading branch information
Showing
3 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require_relative '../../spec_helper' | ||
require_relative '../../shared/queue/freeze' | ||
|
||
describe "Queue#freeze" do | ||
it_behaves_like :queue_freeze, :freeze, -> { Queue.new } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe :queue_freeze, shared: true do | ||
ruby_version_is ""..."3.3" do | ||
it "can be frozen" do | ||
queue = @object.call | ||
queue.freeze | ||
queue.should.frozen? | ||
end | ||
end | ||
|
||
ruby_version_is "3.3" do | ||
it "raises an exception when freezing" do | ||
queue = @object.call | ||
-> { | ||
queue.freeze | ||
}.should raise_error(TypeError, "cannot freeze #{queue}") | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.