about summary refs log tree commit homepage
path: root/t/kgio-pipe-response.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/kgio-pipe-response.ru')
-rw-r--r--t/kgio-pipe-response.ru10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/kgio-pipe-response.ru b/t/kgio-pipe-response.ru
index edd2aac..9c70d47 100644
--- a/t/kgio-pipe-response.ru
+++ b/t/kgio-pipe-response.ru
@@ -1,10 +1,18 @@
 # must be run without Rack::Lint since that clobbers to_path
 use Rainbows::DevFdResponse
 run(lambda { |env|
+  io = case env["rainbows.model"].to_s
+  when /Fiber/
+    Rainbows::Fiber::IO::Pipe
+  else
+    Kgio::Pipe
+  end.popen('cat random_blob', 'rb')
+
   [ 200,
     {
       'Content-Length' => ::File.stat('random_blob').size.to_s,
       'Content-Type' => 'application/octet-stream',
     },
-    Rainbows::Fiber::IO::Pipe.popen('cat random_blob', 'rb') ]
+    io
+  ]
 })