summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/spec_response.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/spec_response.rb b/test/spec_response.rb
index ff7cba6f..4f3a4e4e 100644
--- a/test/spec_response.rb
+++ b/test/spec_response.rb
@@ -464,10 +464,11 @@ describe Rack::Response do
b.wont_equal res.body
end
- it "wraps the body from #to_ary to prevent infinite loops" do
- res = Rack::Response.new
+ it "flatten doesn't cause infinite loop" do
+ # https://github.com/rack/rack/issues/419
+ res = Rack::Response.new("Hello World")
x = res.finish
- assert_equal x, x.flatten
+ assert_equal [200, {}, "Hello World"], x.flatten
end
end