# File lib/action_controller/test_case.rb, line 321 321: def controller_class 322: if current_controller_class = read_inheritable_attribute(:controller_class) 323: current_controller_class 324: else 325: self.controller_class = determine_default_controller_class(name) 326: end 327: end
# File lib/action_controller/test_case.rb, line 316 316: def controller_class=(new_class) 317: prepare_controller_class(new_class) if new_class 318: write_inheritable_attribute(:controller_class, new_class) 319: end
# File lib/action_controller/test_case.rb, line 329 329: def determine_default_controller_class(name) 330: name.sub(/Test$/, '').constantize 331: rescue NameError 332: nil 333: end
# File lib/action_controller/test_case.rb, line 335 335: def prepare_controller_class(new_class) 336: new_class.send :include, ActionController::TestCase::RaiseActionExceptions 337: end
Sets the controller class name. Useful if the name can’t be inferred from test class. Expects controller_class as a constant. Example: tests WidgetController.
# File lib/action_controller/test_case.rb, line 312 312: def tests(controller_class) 313: self.controller_class = controller_class 314: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.