about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-05-03 22:10:54 +0000
committerEric Wong <normalperson@yhbt.net>2009-05-03 22:10:54 +0000
commita5c51c33862580674c997be91dc705c2cf000a36 (patch)
treec753cc06a095988bd75d84f4a93b7ccc870cb143 /test
parent80079f0d94498c87293b79376935645ee13b0972 (diff)
downloadunicorn-a5c51c33862580674c997be91dc705c2cf000a36.tar.gz
readpartial is actually as low-level as sysread is,
except it's less likely to throw exceptions and
won't change the blocking/non-blocking status of
a file descriptor (we explicitly enable blocking I/O)
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_request.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb
index 060da24..a6cb13c 100644
--- a/test/unit/test_request.rb
+++ b/test/unit/test_request.rb
@@ -14,7 +14,9 @@ include Unicorn
 
 class RequestTest < Test::Unit::TestCase
 
-  class MockRequest < StringIO; end
+  class MockRequest < StringIO
+    alias_method :readpartial, :sysread
+  end
 
   def setup
     @request = HttpRequest.new(Logger.new($stderr))