aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-02-28 11:54:49 -0500
committerGitHub <noreply@github.com>2017-02-28 11:54:49 -0500
commit90c275a453af36c01440d1afd9f0f15026b6ceda (patch)
treedf98c93cde35bc9802a1c435184a0254fbabd97c
parent71bcca889e23df0680eef03a3753fc71d59ccd8e (diff)
parent6bee72db6a0261d72280cbc3a5d934245135622a (diff)
downloadrails-90c275a453af36c01440d1afd9f0f15026b6ceda.tar.gz
rails-90c275a453af36c01440d1afd9f0f15026b6ceda.tar.bz2
rails-90c275a453af36c01440d1afd9f0f15026b6ceda.zip
Merge pull request #28202 from baerjam/improve-testing-your-mailers-documentation
Improve documentation for Testing Your Mailers [ci skip]
-rw-r--r--guides/source/testing.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 652030a733..4231500729 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -1435,6 +1435,10 @@ variable. We then ensure that it was sent (the first assert), then, in the
second batch of assertions, we ensure that the email does indeed contain what we
expect. The helper `read_fixture` is used to read in the content from this file.
+NOTE: `email.body.to_s` is present when there's only one (HTML or text) part present.
+If the mailer provides both, you can test your fixture against specific parts
+with `email.text_part.body.to_s` or `email.html_part.body.to_s`.
+
Here's the content of the `invite` fixture:
```