diff options
author | eileencodes <eileencodes@gmail.com> | 2015-12-09 07:51:02 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2015-12-09 08:19:07 -0500 |
commit | b05801754f6423a1d90954ef3f6e2f5dc55c6320 (patch) | |
tree | b909dbee3aef87372f4d1c7a2ce39b5976fd8e85 /tasks | |
parent | 92a9744f8132f46b0e5f49fa5b4d8c66b4e861cb (diff) | |
download | rails-b05801754f6423a1d90954ef3f6e2f5dc55c6320.tar.gz rails-b05801754f6423a1d90954ef3f6e2f5dc55c6320.tar.bz2 rails-b05801754f6423a1d90954ef3f6e2f5dc55c6320.zip |
Fix `make_response!` when called by `serve` in `RouteSet`
All of our tests were testing the `ActionController::Live` behavior in a
standalone environment, without going through the router or behaving
like a real application.
This resulted in `ActionController::Live` throwing the exception
`undefined method 'request' for #<ActionDispatch::Request:0x00000003ad1148>`
because `make_response!` was expecting a response instead of a request.
The expectation of a response came from `set_response!` in non-router
tests setting the response and passing it to `make_response!`. In the
case of an application we would hit `serve` in `RouteSet` first which
would send us to `make_response!` with a request sent instead of a
response.
The changes here remove `set_response!` so `make_response!` always
receives a request.
Thanks to KalabiYau for help with the investigation and solution.
Fixes #22524
[Eileen M. Uchitelle & KalabiYau]
Diffstat (limited to 'tasks')
0 files changed, 0 insertions, 0 deletions