Skip to content

Commit

Permalink
Merge pull request #2225 from herwinw/spec_thread_group
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Sep 20, 2024
2 parents fadd824 + 8aaf95d commit 247a7a5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions spec/core/thread/group_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Thread#group" do
it "needs to be reviewed for spec completeness"
it "returns the default thread group for the main thread" do
Thread.main.group.should == ThreadGroup::Default
end

it "returns the thread group explicitly set for this thread" do
thread = Thread.new { nil }
thread_group = ThreadGroup.new
thread_group.add(thread)
thread.group.should == thread_group
ensure
thread.join if thread
end
end

0 comments on commit 247a7a5

Please sign in to comment.