1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib
Kasper Timm Hansen 333670ceb9 Let TestResponse assign a parser.
Previously we'd only assign a response parser when a request came through
Action Dispatch integration tests. This made calls to `parsed_body` when a TestResponse
was manually instantiated — though own doing or perhaps from a framework — unintentionally
blow up because no parser was set at that time.

The response can lookup a parser entirely through its own ivars. Extract request encoder to
its own file and assume that a viable content type is present at TestResponse instantiation.

Since the default response parser is a no-op, making `parsed_body` equal to `body`, no
exceptions will be thrown.
2016-07-10 22:02:12 +02:00
..
abstract_controller render_to_string Regression Outside of Real Requests in Rails 5.0.0.rc1 (#25308) 2016-06-09 09:36:07 -04:00
action_controller [ci skip] Add 'params' formatting in ActionController::Base 2016-06-30 08:44:07 -05:00
action_dispatch Let TestResponse assign a parser. 2016-07-10 22:02:12 +02:00
action_pack Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
abstract_controller.rb Move Caching module to Abstract Controller 2016-02-23 21:11:15 -03:00
action_controller.rb Move Caching module to Abstract Controller 2016-02-23 21:11:15 -03:00
action_dispatch.rb Provide a middleware to debug misbehaving locks 2016-06-10 19:33:38 +09:30
action_pack.rb Update copyright notices to 2016 [ci skip] 2015-12-31 18:27:19 +02:00