Skip to content

Commit

Permalink
Add specs for Thread#group
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Aug 22, 2024
1 parent fcc0e7e commit 8a3bce7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions core/thread/group_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
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
thread.join
end
end

0 comments on commit 8a3bce7

Please sign in to comment.