module ActionController::TestCase::Behavior::ClassMethods

def tests(controller_class)

tests 'widget'
tests :widget
tests WidgetController

Normalizes +controller_class+ before using.
Sets the controller class name. Useful if the name can't be inferred from test class.
def tests(controller_class)
  case controller_class
  when String, Symbol
    self.controller_class = "#{controller_class.to_s.camelize}Controller".constantize
  when Class
    self.controller_class = controller_class
  else
    raise ArgumentError, "controller class must be a String, Symbol, or Class"
  end
end