diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-12-17 10:24:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 10:24:38 -0500 |
commit | 02b931c764cca4c3f67b1decfc046bfb46dc510c (patch) | |
tree | 04b25f1e0daf1e3f4bf71705bd08fa5dfa51c870 /actionpack/lib/action_dispatch | |
parent | 07ec8062e605ba4e9bd153e1d264b02ac4ab8a0f (diff) | |
parent | 048e3172f51db1fddd03b89f676d96a443539a13 (diff) | |
download | rails-02b931c764cca4c3f67b1decfc046bfb46dc510c.tar.gz rails-02b931c764cca4c3f67b1decfc046bfb46dc510c.tar.bz2 rails-02b931c764cca4c3f67b1decfc046bfb46dc510c.zip |
Merge branch 'master' into host-authorization
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 1e6b21f235..7c1202dc0e 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -14,11 +14,6 @@ module ActionDispatch new response.status, response.headers, response.body end - def initialize(*) # :nodoc: - super - @response_parser = RequestEncoder.parser(content_type) - end - # Was the response successful? def success? ActiveSupport::Deprecation.warn(<<-MSG.squish) @@ -47,7 +42,11 @@ module ActionDispatch end def parsed_body - @parsed_body ||= @response_parser.call(body) + @parsed_body ||= response_parser.call(body) + end + + def response_parser + @response_parser ||= RequestEncoder.parser(content_type) end end end |