Do not use the same test class in different tests

This fixes the following warnings.

```
actionmailer/test/base_test.rb:272: warning: method redefined; discarding old welcome
actionmailer/test/base_test.rb:260: warning: previous definition of welcome was here
```
This commit is contained in:
yuuji.yaginuma 2019-08-01 10:26:30 +09:00
parent 388e011b08
commit 6b3d9f8f86
1 changed files with 2 additions and 2 deletions

View File

@ -268,14 +268,14 @@ class BaseTest < ActiveSupport::TestCase
end
test "accessing inline attachments after mail was called works" do
class LateInlineAttachmentMailer < ActionMailer::Base
class LateInlineAttachmentAccessorMailer < ActionMailer::Base
def welcome
mail body: "yay", from: "welcome@example.com", to: "to@example.com"
attachments.inline["invoice.pdf"]
end
end
assert_nothing_raised { LateInlineAttachmentMailer.welcome.message }
assert_nothing_raised { LateInlineAttachmentAccessorMailer.welcome.message }
end
test "adding inline attachments while rendering mail works" do