We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de35b62 commit b1c6cf6Copy full SHA for b1c6cf6
fixtures/async/http/body/a_writable_body.rb
@@ -86,21 +86,16 @@ module Body
86
}.to raise_exception(RuntimeError, message: be =~ /big/)
87
end
88
89
- it "will stop after finishing" do
90
- output_task = reactor.async do
91
- body.each do |chunk|
92
- expect(chunk).to be == "Hello World!"
93
- end
94
95
-
+ it "can consume chunks" do
96
body.write("Hello World!")
97
body.close
98
99
expect(body).not.to be(:empty?)
100
101
- ::Async::Task.current.yield
+ body.each do |chunk|
+ expect(chunk).to be == "Hello World!"
+ end
102
103
- expect(output_task).to be(:finished?)
104
expect(body).to be(:empty?)
105
106
0 commit comments