# File lib/action_controller/test_case.rb, line 328
328: def controller_class
329: if current_controller_class = read_inheritable_attribute(:controller_class)
330: current_controller_class
331: else
332: self.controller_class = determine_default_controller_class(name)
333: end
334: end
# File lib/action_controller/test_case.rb, line 323
323: def controller_class=(new_class)
324: prepare_controller_class(new_class) if new_class
325: write_inheritable_attribute(:controller_class, new_class)
326: end
# File lib/action_controller/test_case.rb, line 336
336: def determine_default_controller_class(name)
337: name.sub(/Test$/, '').constantize
338: rescue NameError
339: nil
340: end
# File lib/action_controller/test_case.rb, line 342
342: def prepare_controller_class(new_class)
343: new_class.send :include, ActionController::TestCase::RaiseActionExceptions
344: 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 319
319: def tests(controller_class)
320: self.controller_class = controller_class
321: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.