Skip to content

Commit 7ceed8c

Browse files
nwiebesigmavirus24
authored andcommitted
prevent header corruption in tests
1 parent 2616acb commit 7ceed8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/middleware_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ def app; Rack::Lint.new(@app); end
55
def mock_app(options = {}, conditions = {}, custom_headers = {})
66
main_app = lambda { |env|
77
@env = env
8-
headers = {'Content-Type' => "text/html"}.merge custom_headers
9-
[200, headers.dup, @body || ['Hello world!']]
8+
full_headers = headers.merge custom_headers
9+
[200, full_headers, @body || ['Hello world!']]
1010
}
1111

1212
builder = Rack::Builder.new

0 commit comments

Comments
 (0)