diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-03 22:10:54 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-03 22:10:54 +0000 |
commit | a5c51c33862580674c997be91dc705c2cf000a36 (patch) | |
tree | c753cc06a095988bd75d84f4a93b7ccc870cb143 /test | |
parent | 80079f0d94498c87293b79376935645ee13b0972 (diff) | |
download | unicorn-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.rb | 4 |
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)) |