Class: ActionView::TestCase::TestController
Constant Summary
::AbstractController::Rendering - Included
DEFAULT_PROTECTED_INSTANCE_VARIABLES
::ActionController::Rendering - Included
::ActionController::Renderers - Included
::ActiveSupport::Callbacks - Included
::ActionController::RequestForgeryProtection - Included
::ActionController::ForceSSL - Included
ACTION_OPTIONS, REDIRECT_OPTIONS, URL_OPTIONS
::ActionController::ParamsWrapper - Included
::ActionController::Base - Inherited
Class Attribute Summary
- .controller_path=(value) writeonly
::ActionController::Metal - Inherited
::AbstractController::Base - Inherited
.abstract? | Alias for AbstractController::Base.abstract. |
.supports_path? | Returns true if the given controller is capable of rendering a path. |
Class Method Summary
- .new ⇒ TestController constructor
::ActionController::Base - Inherited
.protected_instance_variables, | |
.without_modules | Shortcut helper that returns all the modules included in ::ActionController::Base except the ones passed as arguments: |
::ActionController::Metal - Inherited
.action | Returns a ::Rack endpoint for the given action name. |
.call | Makes the controller a ::Rack endpoint that runs the action in the given |
.controller_name | Returns the last part of the controller's name, underscored, without the ending |
.middleware | Alias for |
.new, | |
.use | Pushes the given ::Rack middleware and its arguments to the bottom of the middleware stack. |
::AbstractController::Base - Inherited
.abstract, | |
.abstract! | Define a controller as abstract. |
.action_methods | A list of method names that should be considered actions. |
.clear_action_methods! | action_methods are cached and there is sometimes need to refresh them. |
.controller_path | Returns the full controller name, underscored, without the ending Controller. |
.hidden_actions | The list of hidden actions. |
.internal_methods | A list of all internal methods for a controller. |
.method_added | Refresh the cached action_methods when a new action_method is added. |
::ActiveSupport::DescendantsTracker - Extended
Instance Attribute Summary
- #controller_path=(path) writeonly
- #params rw
- #request rw
- #response rw
::ActionController::Instrumentation - Included
::ActionController::Rescue - Included
#rescue_handlers, #rescue_handlers?, | |
#show_detailed_exceptions? | Override this method if you want to customize when detailed exceptions must be shown. |
::ActionController::RequestForgeryProtection - Included
::ActionController::StrongParameters - Included
#params | Returns a new ::ActionController::Parameters object that has been instantiated with the |
#params= | Assigns the given |
#rescue_handlers, #rescue_handlers? |
::ActionController::Caching::ConfigMethods - Included
::ActionController::EtagWithTemplateDigest - Included
::ActionController::Renderers::All - Included
::ActionView::Layouts - Included
#_layout_conditions, #action_has_layout=, | |
#action_has_layout? | Controls whether an action should be rendered using a layout. |
::ActionView::Rendering - Included
::ActionController::Redirecting - Included
::ActionController::RackDelegation - Included
::AbstractController::UrlFor - Included
::ActionController::Helpers - Included
::AbstractController::Rendering - Included
::ActionView::ViewPaths - Included
::ActionController::Metal - Inherited
#content_type, | |
#content_type= | Basic implementations for content_type=, location=, and headers are provided to reduce the dependency on the RackDelegation module in ::ActionView::Renderer and Redirector. |
#env, #env=, | |
#headers | The details below can be overridden to support a specific Request and Response object. |
#location, #location=, #middleware_stack, #middleware_stack?, #params, #params=, | |
#performed? | Tests if render or redirect has already happened. |
#request | The details below can be overridden to support a specific Request and Response object. |
#response | The details below can be overridden to support a specific Request and Response object. |
#response_body=, #session, #status, #status= |
::AbstractController::Base - Inherited
Instance Method Summary
::ActionDispatch::TestProcess - Included
#assigns, #cookies, | |
#fixture_file_upload | Shortcut for |
#flash, #redirect_to_url, #session |
::ActionController::Base - Inherited
#request | Returns an ::ActionDispatch::Request instance that represents the current request. |
#response | Returns an ::ActionDispatch::Response that represents the current response. |
::ActionController::ParamsWrapper - Included
#process_action | Performs parameters wrapping upon the request. |
::ActionController::Instrumentation - Included
::ActionController::Rescue - Included
::ActionController::HttpAuthentication::Token::ControllerMethods - Included
#authenticate_or_request_with_http_token, #authenticate_with_http_token, #request_http_token_authentication |
::ActionController::HttpAuthentication::Digest::ControllerMethods - Included
#authenticate_or_request_with_http_digest, | |
#authenticate_with_http_digest | Authenticate with HTTP Digest, returns true or false. |
#request_http_digest_authentication | Render output including the HTTP Digest authentication header. |
::ActionController::HttpAuthentication::Basic::ControllerMethods - Included
#authenticate_or_request_with_http_basic, #authenticate_with_http_basic, #request_http_basic_authentication |
::ActionController::DataStreaming - Included
#send_data | Sends the given binary data to the browser. |
#send_file | Sends the file. |
::ActionController::ForceSSL - Included
#force_ssl_redirect | Redirect the existing request to use the HTTPS protocol. |
::ActionController::Flash - Included
::ActiveSupport::Rescuable - Included
#handler_for_rescue, | |
#rescue_with_handler | Tries to rescue the exception by looking up and calling a registered handler. |
::ActionController::ImplicitRender - Included
::ActionController::MimeResponds - Included
#respond_to | Without web-service support, an action which collects the data for displaying a list of people might look something like this: |
#respond_with |
::ActionController::Caching - Included
::ActionController::Caching::Fragments - Included
#expire_fragment | Removes fragments from the cache. |
#fragment_cache_key | Given a key (as described in |
#fragment_exist? | Check if a cached fragment from the location signified by |
#read_fragment | Reads a cached fragment from the location signified by |
#write_fragment | Writes |
::AbstractController::Callbacks - Included
#process_action | Override AbstractController::Base's process_action to run the process_action callbacks around the normal behavior. |
::ActiveSupport::Callbacks - Included
#run_callbacks | Runs the callbacks for the given event. |
::ActionController::ConditionalGet - Included
#expires_in | Sets a HTTP 1.1 Cache-Control header. |
#expires_now | Sets a HTTP 1.1 Cache-Control header of |
#fresh_when | Sets the |
#stale? | Sets the |
::ActionController::Head - Included
#head | Returns a response that has no content (merely headers). |
::ActionController::Renderers - Included
::ActionController::Rendering - Included
#render_to_body, | |
#render_to_string | Overwrite render_to_string because body can now be set to a rack body. |
::ActionView::Rendering - Included
#render_to_body, #rendered_format, | |
#view_context | An instance of a view class. |
#view_renderer | Returns an object that is able to render templates. |
::ActionController::Redirecting - Included
#redirect_to | Redirects the browser to the target specified in |
::ActionController::RackDelegation - Included
::ActiveSupport::Benchmarkable - Included
#benchmark | Allows you to measure the execution time of a block in a template and records the result to the log. |
::ActionController::UrlFor - Included
::AbstractController::UrlFor - Included
::ActionDispatch::Routing::UrlFor - Included
#initialize, | |
#url_for | Generate a url based on the options provided, default_url_options and the routes defined in routes.rb. |
#url_options | Hook overridden in controller to add request information with |
::ActionDispatch::Routing::PolymorphicRoutes - Included
#polymorphic_path | Returns the path component of a URL for the given record. |
#polymorphic_url | Constructs a call to a named RESTful route for the given record and returns the resulting URL string. |
::ActionController::ModelNaming - Included
#convert_to_model | Converts the given object to an ::ActiveModel compliant one. |
#model_name_from_record_or_class |
::AbstractController::Translation - Included
#l | Alias for AbstractController::Translation#localize. |
#localize | Delegates to |
#t | Alias for AbstractController::Translation#translate. |
#translate | Delegates to |
::AbstractController::Rendering - Included
#_normalize_args | Normalize args by converting render “foo” to render |
#_normalize_options | Normalize options. |
#_normalize_render | Normalize args and options. |
#_process_format | Process the rendered format. |
#_process_options | Process extra options. |
#render | Normalize arguments, options and then delegates render_to_body and sticks the result in self.response_body. |
#render_to_body | Performs the actual template rendering. |
#render_to_string | Raw rendering of a template to a string. |
#rendered_format | Returns Content-Type of rendered content :api: public. |
#view_assigns | This method should return a hash with assigns. |
::ActionView::ViewPaths - Included
#append_view_path, #details_for_lookup, | |
#lookup_context | ::ActionView::LookupContext is the object responsible to hold all information required to lookup templates, i.e. view paths and details. |
#prepend_view_path, #template_exists? |
::ActionController::Metal - Inherited
#controller_name | Delegates to the class' |
#url_for | Basic url_for that can be overridden for more robust functionality. |
::AbstractController::Base - Inherited
#action_methods | Delegates to the class' |
#available_action? | Returns true if a method for the action is available and can be dispatched, false otherwise. |
#controller_path | Delegates to the class' |
#process | Calls the action going through the entire action dispatch stack. |
::ActiveSupport::Configurable - Included
#config | Reads and writes attributes from a configuration |
Constructor Details
.new ⇒ TestController
# File 'actionview/lib/action_view/test_case.rb', line 24
def initialize super self.class.controller_path = "" @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.env.delete('PATH_INFO') @params = {} end
Class Attribute Details
.controller_path=(value) (writeonly)
[ GitHub ]# File 'actionview/lib/action_view/test_case.rb', line 17
attr_writer :controller_path
Instance Attribute Details
#controller_path=(path) (writeonly)
[ GitHub ]# File 'actionview/lib/action_view/test_case.rb', line 20
def controller_path=(path) self.class.controller_path=(path) end