Module: ActionMailer::TestCase::Behavior::ClassMethods
- Defined in:
- lib/action_mailer/test_case.rb
Instance Method Summary collapse
Instance Method Details
#determine_default_mailer(name) ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/action_mailer/test_case.rb', line 69 def determine_default_mailer(name) mailer = determine_constant_from_test_name(name) do |constant| Class === constant && constant < ActionMailer::Base end raise NonInferrableMailerError.new(name) if mailer.nil? mailer end |
#mailer_class ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/action_mailer/test_case.rb', line 61 def mailer_class if mailer = _mailer_class mailer else tests determine_default_mailer(name) end end |
#tests(mailer) ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/action_mailer/test_case.rb', line 50 def tests(mailer) case mailer when String, Symbol self._mailer_class = mailer.to_s.camelize.constantize when Module self._mailer_class = mailer else raise NonInferrableMailerError.new(mailer) end end |