From 5963f40e2742a68b61325b90d522ea8becdd975e Mon Sep 17 00:00:00 2001 From: Dennis Paagman Date: Tue, 28 Nov 2023 20:51:29 +0100 Subject: [PATCH] Only reload when setting new parent_mailer --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 64ce7c1..3bc05a4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -56,7 +56,7 @@ def with_config(options) # We need to reload the application, because the config can set a different # parent_mailer class, which means `Passwordless::Mailer` needs to be # reloaded. Simply reloading the whole application seems to be the easiest. - Rails.application.reloader.reload! + Rails.application.reloader.reload! if options.has_key?(:parent_mailer) yield ensure