rails / 7.0.0 / actionview / testcase / testcontroller.html /

class ActionView::TestCase::TestController

Parent:
ActionController::Base
Included modules:
ActionDispatch::TestProcess

Attributes

controller_path [RW]
params [RW]
request [RW]
response [RW]

Public Class Methods

controller_name () Show source
# File actionview/lib/action_view/test_case.rb, line 27
def self.controller_name
  "test"
end
new () Show source
# File actionview/lib/action_view/test_case.rb, line 31
def initialize
  super
  self.class.controller_path = ""
  @request = ActionController::TestRequest.create(self.class)
  @response = ActionDispatch::TestResponse.new

  @request.env.delete("PATH_INFO")
  @params = ActionController::Parameters.new
end
Calls superclass method

Public Instance Methods

controller_path= (path) Show source
# File actionview/lib/action_view/test_case.rb, line 23
def controller_path=(path)
  self.class.controller_path = path
end

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.