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

Fix assertion that was never run

In order to run whether the `welcome` method of the ActionMailer::Base
subclass raises an error, `message` must be called, otherwise the method
is not executed at all.

You could just replace with `def welcome; raise StandardError; end` and you
would still see a passing test.

This commit fixes the test so the assertion is actually executed, just like
any other tests in the file, where `.message` is called.
This commit is contained in:
claudiob 2015-01-11 11:50:29 -08:00
parent 7b47f422cf
commit e4613c97c3

View file

@ -287,7 +287,7 @@ class BaseTest < ActiveSupport::TestCase
end
end
assert_nothing_raised { LateAttachmentAccessorMailer.welcome }
assert_nothing_raised { LateAttachmentAccessorMailer.welcome.message }
end
# Implicit multipart