Permalink
Browse files

tests work with new select(2) based read logic

  • Loading branch information...
1 parent 306d20c commit 30d01d66a2d2cc7c66f2e765cbb5a2d0d7adae8b @rtomayko rtomayko committed Feb 5, 2010
Showing with 6 additions and 6 deletions.
  1. +6 −6 test/action_test.rb
View
@@ -54,8 +54,8 @@ class ActionTest < Test::Unit::TestCase
io = stub()
io.expects(:write).with("\000\000\000\003")
io.expects(:write).with("foo")
- io.expects(:read).with(4).returns("\000\000\000\003")
- io.expects(:read).with(3).returns("bar")
+ @call.expects(:read).with(io, 4, nil).returns("\000\000\000\003")
+ @call.expects(:read).with(io, 3, nil).returns("bar")
io.expects(:close)
@call.expects(:connect_to).returns(io)
assert_equal "bar", @call.transaction("foo")
@@ -65,7 +65,7 @@ class ActionTest < Test::Unit::TestCase
io = stub()
io.expects(:write).with("\000\000\000\003")
io.expects(:write).with("foo")
- io.expects(:read).with(4).returns(nil)
+ @call.expects(:read).with(io, 4, nil).returns(nil)
@call.expects(:connect_to).returns(io)
begin
@call.transaction("foo")
@@ -79,8 +79,8 @@ class ActionTest < Test::Unit::TestCase
io = stub()
io.expects(:write).with("\000\000\000\003")
io.expects(:write).with("foo")
- io.expects(:read).with(4).returns("\000\000\000\003")
- io.expects(:read).with(3).returns(nil)
+ @call.expects(:read).with(io, 4, nil).returns("\000\000\000\003")
+ @call.expects(:read).with(io, 3, nil).returns(nil)
@call.expects(:connect_to).returns(io)
begin
@call.transaction("foo")
@@ -94,7 +94,7 @@ class ActionTest < Test::Unit::TestCase
io = stub()
io.expects(:write).with("\000\000\000\003")
io.expects(:write).with("foo")
- io.expects(:read).with(4).raises(Errno::EAGAIN)
+ @call.expects(:read).with(io, 4, nil).raises(Errno::EAGAIN)
@call.expects(:connect_to).returns(io)
begin
@call.transaction("foo")

0 comments on commit 30d01d6

Please sign in to comment.