Skip to content

Commit 7d4d453

Browse files
committed
Enable streaming test on Rack >= 2.
1 parent 1372bfb commit 7d4d453

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

lib/protocol/rack/adapter/rack2.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def call(request)
9090
raise ArgumentError, "Headers must not be nil!"
9191
end
9292

93-
unless body.respond_to?(:each)
94-
raise ArgumentError, "Body must respond to #each!"
95-
end
93+
# unless body.respond_to?(:each)
94+
# raise ArgumentError, "Body must respond to #each!"
95+
# end
9696

9797
headers, meta = self.wrap_headers(headers)
9898

test/protocol/rack/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
let(:response) {client.get("/")}
113113

114114
it "can read streaming response" do
115-
skip "Streaming response not supported"
115+
skip "Streaming response not supported" if Protocol::Rack::Adapter::VERSION < "2"
116116

117117
expect(response.read).to be == "Hello Streaming World"
118118
end

test/protocol/rack/adapter/rack2.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@
7777
end
7878
end
7979

80-
with "string response" do
81-
let(:app) {->(env) {[200, {}, "Hello"]}}
80+
# with "string response" do
81+
# let(:app) {->(env) {[200, {}, "Hello"]}}
8282

83-
it "handles string response correctly" do
84-
expect(response.status).to be == 500
85-
expect(response.read).to be == "ArgumentError: Body must respond to #each!"
86-
end
87-
end
83+
# it "handles string response correctly" do
84+
# expect(response.status).to be == 500
85+
# expect(response.read).to be == "ArgumentError: Body must respond to #each!"
86+
# end
87+
# end
8888
end
8989

9090
with "header transformation" do

0 commit comments

Comments
 (0)