From da1fbb9a00e330331d00f27c8a40ea62d0d1d224 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Fri, 12 Feb 2016 20:07:01 +0100 Subject: Add fixes accidentally removed. Yesterday, when improving how `parsed_body` extracted a parser I wrote 77bbf1e. Then I thought that was too many changes in one commit and broke it up locally... or so I thought. When pushed the extra commits removed the changes! Wups! In shame, lob those changes together here: * 3b94c38 which meant to fix the CHANGELOG syntax error. * 5007df5 which meant to mention `parsed_body` in the docs. * 036a7a0 which meant to memoize the `parsed_body`. --- actionpack/lib/action_dispatch/testing/integration.rb | 3 ++- actionpack/lib/action_dispatch/testing/test_response.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 8a8e22053a..f4534b4173 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -729,7 +729,8 @@ module ActionDispatch # response_parser: -> body { body } # # Where `param_encoder` defines how the params should be encoded and - # `response_parser` defines how the response body should be parsed. + # `response_parser` defines how the response body should be parsed through + # `parsed_body`. # # Consult the Rails Testing Guide for more. diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 4f289ad4b5..9d4b73a43d 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -22,7 +22,7 @@ module ActionDispatch attr_writer :response_parser # :nodoc: def parsed_body - @response_parser.call(body) + @parsed_body ||= @response_parser.call(body) end end end -- cgit v1.2.3