diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-19 19:19:20 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-19 19:19:20 -0800 |
commit | a3c6ad7d5e567cf4d688147357c5de134763599d (patch) | |
tree | 9f17a4cdc3b24a6f316e94617aeb5a2bf57ff55f /actionpack/lib/action_dispatch/testing | |
parent | bf8898b49b5a8c03d328bde7b6ee30edb02d873b (diff) | |
download | rails-a3c6ad7d5e567cf4d688147357c5de134763599d.tar.gz rails-a3c6ad7d5e567cf4d688147357c5de134763599d.tar.bz2 rails-a3c6ad7d5e567cf4d688147357c5de134763599d.zip |
Fix a bunch of pending tests by providing an introspection mode for the Response object that does up-front parsing of the headers to populate things like @etag
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 2093bb3a0e..d179af47d9 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -273,7 +273,8 @@ module ActionDispatch @request_count += 1 @request = ActionDispatch::Request.new(session.last_request.env) - @response = ActionDispatch::TestResponse.from_response(@mock_session.last_response) + response = @mock_session.last_response + @response = ActionDispatch::TestResponse.new(response.status, response.headers, response.body) @html_document = nil @controller = session.last_request.env['action_controller.instance'] |