1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add yield to with_delivery_job test helper

Adds yield to parameterized mail test helper so assertions
passed into with_delivery_job are actually ran.
This commit is contained in:
Gannon McGibbon 2018-11-30 17:37:00 -05:00
parent f6e1061c91
commit ebf484a640

View file

@ -83,6 +83,7 @@ class ParameterizedTest < ActiveSupport::TestCase
def with_delivery_job(job)
old_delivery_job = ParamsMailer.delivery_job
ParamsMailer.delivery_job = job
yield
ensure
ParamsMailer.delivery_job = old_delivery_job
end