Methods
- C
- D
- P
- T
Instance Public methods
controller_class()
Link
controller_class=(new_class)
Link
determine_default_controller_class(name)
Link
prepare_controller_class(new_class)
Link
tests(controller_class)
Link
Sets the controller class name. Useful if the name can’t be inferred from
test class. Normalizes controller_class
before using.
Examples:
tests WidgetController tests :widget tests 'widget'
# File actionpack/lib/action_controller/test_case.rb, line 356 def tests(controller_class) case controller_class when String, Symbol self.controller_class = "#{controller_class.to_s.underscore}_controller".camelize.constantize when Class self.controller_class = controller_class else raise ArgumentError, "controller class must be a String, Symbol, or Class" end end