diff options
Diffstat (limited to 'test/test_wbuf.rb')
-rw-r--r-- | test/test_wbuf.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_wbuf.rb b/test/test_wbuf.rb index 990ad9d..1382086 100644 --- a/test/test_wbuf.rb +++ b/test/test_wbuf.rb @@ -9,6 +9,9 @@ class TestWbuf < Testcase class KgioUS < UNIXSocket include Kgio::SocketMethods + def self.output_buffer_tmpdir + Dir.tmpdir + end end def socketpair @@ -20,7 +23,7 @@ class TestWbuf < Testcase buf = "*" * (16384 * 2) nr = 1000 [ true, false ].each do |persist| - wbuf = Yahns::Wbuf.new([], persist, Dir.tmpdir) + wbuf = Yahns::Wbuf.new([], persist) assert_equal false, wbuf.busy a, b = socketpair assert_nil wbuf.wbuf_write(a, "HIHI") @@ -71,7 +74,7 @@ class TestWbuf < Testcase break end while true end - wbuf = Yahns::Wbuf.new([], true, Dir.tmpdir) + wbuf = Yahns::Wbuf.new([], true) rv1 = wbuf.wbuf_write(a, buf) rv2 = wbuf.wbuf_flush(a) @@ -104,7 +107,7 @@ class TestWbuf < Testcase def test_wbuf_flush_close pipe = cloexec_pipe persist = true - wbuf = Yahns::Wbuf.new(pipe[0], persist, Dir.tmpdir) + wbuf = Yahns::Wbuf.new(pipe[0], persist) refute wbuf.respond_to?(:close) # we don't want this for HttpResponse body sp = socketpair rv = nil |