Skip to Content Skip to Search

module ActionMailer::TestCase::Behavior

Inherits From

Public instance methods

Reads the fixture file for the given mailer.

This is useful when testing mailers by being able to write the body of an email inside a fixture. See the testing guide for a concrete example:

Source code GitHub
# File actionmailer/lib/action_mailer/test_case.rb, line 82
def read_fixture(action)
  IO.readlines(File.join(Rails.root, "test", "fixtures",, action))


Definition files