Module: TestSupport

Defined in:
lib/hanami/minitest/generators/templates/support_mailers.rb,
lib/hanami/minitest/generators/templates/support_db.rb,
lib/hanami/minitest/generators/templates/support_db_cleaning.rb

Overview

Reset recorded mail deliveries between tests.

In the test env, mail is delivered via a shared test delivery method, so recorded deliveries accumulate across tests. Include this module in any test that sends mail to start with a clean slate:

class Mailers::WelcomeTest < Hanami::Minitest::Test
include TestSupport::Mailers
# ...
end

Defined Under Namespace

Modules: DB, Mailers