Class: ActionView::TestCase::TestController

Inherits:
ActionController::Base show all
Includes:
ActionDispatch::TestProcess
Defined in:
lib/action_view/test_case.rb

Constant Summary

Constants inherited from ActionController::Base

ActionController::Base::MODULES

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ActionDispatch::TestProcess

#assigns, #cookies, #fixture_file_upload, #flash, #redirect_to_url, #session

Methods inherited from ActionController::Base

inherited, without_modules

Methods included from ActionController::Base::DeprecatedBehavior

#allow_concurrency, #allow_concurrency=, #consider_all_requests_local, #consider_all_requests_local=, #cookie_verifier_secret, #cookie_verifier_secret=, #exempt_from_layout, #filter_parameter_logging, #ip_spoofing_check, #ip_spoofing_check=, #relative_url_root, #relative_url_root=, #resource_action_separator, #resource_action_separator=, #session, #session=, #trusted_proxies, #trusted_proxies=, #use_accept_header, #use_accept_header=, #verify

Methods included from ActionController::Compatibility

#_handle_method_missing, #_normalize_options, #assign_shortcuts, #initialize_template_class, #method_for_action, #performed?, #render_to_body

Methods inherited from ActionController::Metal

action, call, #content_type, #content_type=, #controller_name, controller_name, #dispatch, inherited, #location, #location=, middleware, #response_body=, #status, #status=, #to_a, use

Methods inherited from AbstractController::Base

abstract!, #action_methods, action_methods, clear_action_methods!, controller_path, #controller_path, hidden_actions, internal_methods, method_added, #process

Constructor Details

#initializeTestController

Returns a new instance of TestController.



22
23
24
25
26
27
28
29
30
# File 'lib/action_view/test_case.rb', line 22

def initialize
  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) ⇒ Object (writeonly)

Sets the attribute controller_path

Parameters:

  • value

    the value to set the attribute controller_path to.



15
16
17
# File 'lib/action_view/test_case.rb', line 15

def controller_path=(value)
  @controller_path = value
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



12
13
14
# File 'lib/action_view/test_case.rb', line 12

def params
  @params
end

#requestObject

Returns the value of attribute request.



12
13
14
# File 'lib/action_view/test_case.rb', line 12

def request
  @request
end

#responseObject

Returns the value of attribute response.



12
13
14
# File 'lib/action_view/test_case.rb', line 12

def response
  @response
end

Instance Method Details

#controller_path=(path) ⇒ Object



18
19
20
# File 'lib/action_view/test_case.rb', line 18

def controller_path=(path)
  self.class.controller_path=(path)
end