Class: ActionDispatch::TestResponse
- Defined in:
- lib/action_dispatch/testing/test_response.rb
Overview
Integration test methods such as ActionDispatch::Integration::Session#get and ActionDispatch::Integration::Session#post return objects of class TestResponse, which represent the HTTP response results of the requested controller actions.
See Response for more information on controller response objects.
Direct Known Subclasses
Constant Summary
Constants inherited from Response
Response::CONTENT_TYPE, Response::EMPTY, Response::LOCATION, Response::NO_CONTENT_CODES, Response::SET_COOKIE
Constants included from Http::FilterRedirect
Http::FilterRedirect::FILTERED
Instance Attribute Summary
Attributes inherited from Response
#charset, #content_type, #header, #request, #sending_file, #status, #stream
Attributes included from Http::Cache::Response
Class Method Summary collapse
Methods inherited from Response
#abort, #await_commit, #await_sent, #body, #body=, #body_parts, #close, #code, #commit!, #committed?, #cookies, #delete_cookie, #initialize, #location, #location=, #message, #response_code, #sending!, #sending?, #sent!, #sent?, #set_cookie, #to_a, #to_ary
Methods included from Http::Cache::Response
#date, #date=, #date?, #last_modified, #last_modified=, #last_modified?
Methods included from Http::FilterRedirect
Constructor Details
This class inherits a constructor from ActionDispatch::Response
Class Method Details
.from_response(response) ⇒ Object
9 10 11 |
# File 'lib/action_dispatch/testing/test_response.rb', line 9 def self.from_response(response) new response.status, response.headers, response.body, default_headers: nil end |