aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/thread/current_spec.rb
blob: cc969b71c43e79a37e1957e77781aa588dadf085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Thread.current" do
  it "returns a thread" do
    current = Thread.current
    current.should be_kind_of(Thread)
  end

  it "returns the current thread" do
    t = Thread.new { Thread.current }
    t.value.should equal(t)
    Thread.current.should_not equal(t.value)
  end
end