123456789_123456789_123456789_123456789_123456789_

Class: ActionController::LiveTestResponse

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActionController::Live::Response
Defined in: actionpack/lib/action_controller/test_case.rb

Constant Summary

::ActionDispatch::Http::Cache::Response - Included

DATE, DEFAULT_CACHE_CONTROL, LAST_MODIFIED, MUST_REVALIDATE, NO_CACHE, NO_STORE, PRIVATE, PUBLIC, SPECIAL_KEYS

::ActionDispatch::Response - Inherited

CONTENT_TYPE, LOCATION, NO_CONTENT_CODES, NullContentTypeHeader, SET_COOKIE

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

::ActionDispatch::Response - Inherited

#body

Returns the content of the response as a string.

#body=

Allows you to manually set or override the response body.

#charset

The charset of the response.

#charset=

Sets the HTTP character set.

#committed?,
#content_type

Content type of response.

#content_type=

Sets the HTTP response’s content MIME type.

#default_charset, #default_headers,
#header

Get headers for this response.

#headers
#request

The request that the response is responding to.

#sending?, #sending_file=, #sent?,
#status

The HTTP status code.

#status=

Sets the HTTP status code.

#stream

The underlying body, as a streamable object.

::ActionDispatch::Http::Cache::Response - Included

#cache_control, #date, #date=, #date?,
#etag=

This method sets a weak ETag validator on the response so browsers and proxies may cache the response, keyed on the ETag.

#etag?, #last_modified, #last_modified=, #last_modified?, #strong_etag=,
#strong_etag?

True if an ETag is set and it isn’t a weak validator (not preceded with W/).

#weak_etag=,
#weak_etag?

True if an ETag is set and it’s a weak validator (preceded with W/).

Instance Method Summary

::ActionDispatch::Response - Inherited

#[], #[]=,
#_cache_control

Aliasing these off because AD::Http::Cache::Response defines them.

#_cache_control=, #abort, #await_commit, #await_sent, #body_parts, #close,
#code

Returns a string to ensure compatibility with Net::HTTPResponse.

#commit!,
#cookies

Returns the response cookies, converted to a ::Hash of (name => value) pairs.

#delete_header, #each, #get_header, #handle_no_content!, #has_header?,
#media_type

Media type of response.

#message

Returns the corresponding message for the current HTTP status code:

#prepare!
#rack_response,
#redirect_url

The location header we’ll be responding with.

#reset_body!,
#response_code

The response code of the request.

#send_file

Send the file stored at path as the response body.

#sending!, #sent!, #set_header,
#status_message
#to_a

Turns the Response into a Rack-compatible array of the status, headers, and body.

#write

Constructor Details

This class inherits a constructor from ActionDispatch::Response

Instance Method Details

#error?

Was there a server-side error?

[ GitHub ]

  
# File 'actionpack/lib/action_controller/test_case.rb', line 177

alias_method :error?, :server_error?

#missing?

Was the URL not found?

[ GitHub ]

  
# File 'actionpack/lib/action_controller/test_case.rb', line 174

alias_method :missing?, :not_found?

#success?

Was the response successful?

[ GitHub ]

  
# File 'actionpack/lib/action_controller/test_case.rb', line 171

alias_method :success?, :successful?