From 69b734caaf5601f9614459ef88d79aa9366caeff Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Thu, 10 Aug 2023 11:29:52 +0200 Subject: [PATCH] test gets in task --- test/async/task.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/async/task.rb b/test/async/task.rb index d1200a38..c45905e1 100644 --- a/test/async/task.rb +++ b/test/async/task.rb @@ -836,4 +836,16 @@ def sleep_forever end end end + + it "can gets in a task" do + IO.pipe do |input, output| + Async do + Async do + expect(input.gets).to be == "hello\n" + end + output.puts "hello" + end + end + end + end