Class: ActionView::TestCase::TestController

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

Constant Summary

Constant Summary

Constants inherited from ActionController::Base

ActionController::Base::MODULES, ActionController::Base::PROTECTED_IVARS

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

#_protected_ivars, protected_instance_variables, without_modules

Methods inherited from ActionController::Metal

action, call, #content_type, #content_type=, #controller_name, controller_name, #dispatch, #env, inherited, #location, #location=, middleware, #performed?, #response_body=, #status, #status=, #to_a, #url_for, use

Methods inherited from AbstractController::Base

abstract!, #action_methods, action_methods, #available_action?, clear_action_methods!, controller_path, #controller_path, hidden_actions, inherited, internal_methods, method_added, #process

Methods included from ActiveSupport::DescendantsTracker

clear, #descendants, descendants, #direct_descendants, direct_descendants, #inherited, store_inherited

Methods included from ActiveSupport::Configurable

#config

Methods included from ActiveSupport::Concern

#append_features, #class_methods, extended, #included

Constructor Details

- (TestController) initialize



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

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

+ (Object) controller_path=(value) (writeonly)

Sets the attribute controller_path



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

def controller_path=(value)
  @controller_path = value
end

Instance Attribute Details

- (Object) params

Returns the value of attribute params



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

def params
  @params
end

- (Object) request

Returns the value of attribute request



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

def request
  @request
end

- (Object) response

Returns the value of attribute response



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

def response
  @response
end

Instance Method Details

- (Object) controller_path=(path)



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

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