summaryrefslogtreecommitdiff
path: root/lib/rb/spec
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rb/spec')
-rw-r--r--lib/rb/spec/socket_spec_shared.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rb/spec/socket_spec_shared.rb b/lib/rb/spec/socket_spec_shared.rb
index 96b433b8c..6ed77fa46 100644
--- a/lib/rb/spec/socket_spec_shared.rb
+++ b/lib/rb/spec/socket_spec_shared.rb
@@ -91,7 +91,7 @@ shared_examples_for "a socket" do
it "should raise an error when read times out" do
@socket.timeout = 0.5
@socket.open
- IO.should_receive(:select).with([@handle], nil, nil, 0.5).at_least(1).times.and_return(nil)
+ IO.should_receive(:select).once {sleep(0.5); nil}
lambda { @socket.read(17) }.should raise_error(Thrift::TransportException) { |e| e.type.should == Thrift::TransportException::TIMED_OUT }
end