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

CACHE_CONTROL, DATE, DEFAULT_CACHE_CONTROL, ETAG, LAST_MODIFIED, MUST_REVALIDATE, NO_CACHE, PRIVATE, PUBLIC, SPECIAL_KEYS

::ActionDispatch::Response - Inherited

CONTENT_TYPE, EMPTY, LOCATION, NO_CONTENT_CODES, 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.

#committed?,
#content_type

Sets the HTTP response's content MIME type.

#content_type=

Sets the HTTP content type.

#default_charset, #default_headers, #each,
#header

Get and set headers for this response.

#headers
#location

The location header we'll be responding with.

#location=

Sets the location header we'll be responding with.

#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

Instance Method Summary

::ActionDispatch::Response - Inherited

#[], #[]=, #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_cookie,
#message

Returns the corresponding message for the current HTTP status code:

#prepare!
#rack_response,
#redirect_url
#response_code

The response code of the request.

#sending!, #sent!, #set_cookie,
#status_message
#to_a

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

#to_ary

Be super clear that a response object is not an ::Array.

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

::ActionDispatch::Http::FilterRedirect - Included

Constructor Details

This class inherits a constructor from ActionDispatch::Response

Instance Method Details

#body

[ GitHub ]

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

def body
  @body ||= super
end

#error?

Was there a server-side error?

[ GitHub ]

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

alias_method :error?, :server_error?

#missing?

Was the URL not found?

[ GitHub ]

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

alias_method :missing?, :not_found?

#recycle!

[ GitHub ]

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

def recycle!
  @body = nil
  initialize
end

#redirect?

Were we redirected?

[ GitHub ]

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

alias_method :redirect?, :redirection?

#success?

Was the response successful?

[ GitHub ]

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

alias_method :success?, :successful?