Sha256: 5e3bec2fe2688046fb6b0c6c68f0854585f03650d12907dd7748ff5ed5f2154d
Contents?: true
Size: 726 Bytes
Versions: 83
Compression:
Stored size: 726 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Thread#value" do it "returns the result of the block" do Thread.new { 3 }.value.should == 3 end it "re-raises error for an uncaught exception" do t = Thread.new { raise "Hello" } lambda { t.value }.should raise_error(RuntimeError, "Hello") end it "is false for a killed thread" do t = Thread.new { Thread.current.exit } t.value.should == false end it "is false for an uncaught exception thrown from a dying thread" do t = ThreadSpecs.dying_thread_ensures { 1/0 } t.value.should == false end end
Version data entries
83 entries across 83 versions & 1 rubygems