Created
September 1, 2011 19:13
-
-
Save sgonyea/1186991 to your computer and use it in GitHub Desktop.
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
describe "MTPS" do | |
subject { Thrift::MutexableThreadPoolServer.new nil, nil } | |
def Thread.block=(block); @block = block; end | |
def Thread.block(&block) | |
self.block = block if block_given? | |
return(@block) | |
end | |
let(:server) { subject } | |
let(:thread_block) { Thread.block } | |
let(:queue_thread) { proc { server.queue_thread }} | |
before(:each) { | |
Thread.block = nil | |
stub(Thread).new.implemented_by(Thread.method(:block)) | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment