aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/thread/exclusive_spec.rb
blob: 66c87f471379396c6ceb3e06a134fb346f913473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require File.expand_path('../../../spec_helper', __FILE__)

describe "Thread.exclusive" do
  before :each do
    ScratchPad.clear
  end

  it "yields to the block" do
    Thread.exclusive { ScratchPad.record true }
    ScratchPad.recorded.should == true
  end

  it "returns the result of yielding" do
    Thread.exclusive { :result }.should == :result
  end

  it "needs to be reviewed for spec completeness"
end