We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4c00c4 commit 4e0c865Copy full SHA for 4e0c865
lib/rspec/rails/matchers/have_http_status.rb
@@ -43,7 +43,8 @@ def as_test_response(obj)
43
# Capybara or catch `NameError`s for the undefined constants
44
obj = ActionDispatch::Response.new.tap do |resp|
45
resp.status = obj.status_code
46
- resp.headers = obj.response_headers
+ resp.headers.clear
47
+ resp.headers.merge!(obj.response_headers)
48
resp.body = obj.body
49
end
50
::ActionDispatch::TestResponse.from_response(obj)
0 commit comments