diff options
Diffstat (limited to 'spec/ruby/library/conditionvariable/wait_spec.rb')
-rw-r--r-- | spec/ruby/library/conditionvariable/wait_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/library/conditionvariable/wait_spec.rb b/spec/ruby/library/conditionvariable/wait_spec.rb index 8bdb7829d3..f57ab4c778 100644 --- a/spec/ruby/library/conditionvariable/wait_spec.rb +++ b/spec/ruby/library/conditionvariable/wait_spec.rb @@ -2,6 +2,15 @@ require_relative '../../spec_helper' require 'thread' describe "ConditionVariable#wait" do + it "calls #sleep on the given object" do + o = Object.new + o.should_receive(:sleep).with(1234) + + cv = ConditionVariable.new + + cv.wait(o, 1234) + end + it "returns self" do m = Mutex.new cv = ConditionVariable.new |