diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-12 20:07:01 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-12 20:13:48 +0100 |
commit | da1fbb9a00e330331d00f27c8a40ea62d0d1d224 (patch) | |
tree | c806f0c7e34cbc0f1afb71070d83f1e80a0175fd /actionpack/lib/action_dispatch | |
parent | 354fb73ff26452be52656c793502431f03a05563 (diff) | |
download | rails-da1fbb9a00e330331d00f27c8a40ea62d0d1d224.tar.gz rails-da1fbb9a00e330331d00f27c8a40ea62d0d1d224.tar.bz2 rails-da1fbb9a00e330331d00f27c8a40ea62d0d1d224.zip |
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`.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 2 |
2 files changed, 3 insertions, 2 deletions
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 |