module ActionMailer::TestCase::Behavior::ClassMethods

def determine_default_mailer(name)

def determine_default_mailer(name)
  name.sub(/Test$/, '').constantize
rescue NameError
  raise NonInferrableMailerError.new(name)
end

def mailer_class

def mailer_class
  if mailer = self._mailer_class
    mailer
  else
    tests determine_default_mailer(name)
  end
end

def tests(mailer)

def tests(mailer)
  self._mailer_class = mailer
end