aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorKonstantinos Rousis <rousisk@gmail.com>2015-08-28 09:18:52 +0200
committerKonstantinos Rousis <rousisk@gmail.com>2015-08-28 09:39:06 +0200
commit7ddf72d008ed35562401034e78e589b138c3041a (patch)
tree6e7d8d928730dae8d2b0a45e578b87b13e861518 /guides
parent93a4dfaebc48e3324997be780539fad996349c84 (diff)
downloadrails-7ddf72d008ed35562401034e78e589b138c3041a.tar.gz
rails-7ddf72d008ed35562401034e78e589b138c3041a.tar.bz2
rails-7ddf72d008ed35562401034e78e589b138c3041a.zip
fix reference to undefined variable in email testing guide [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 1cc49a36d2..aa3497fa13 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -1115,10 +1115,13 @@ require 'test_helper'
class UserMailerTest < ActionMailer::TestCase
test "invite" do
+ # Create the email and store it for further assertions
+ email = UserMailer.create_invite('me@example.com',
+ 'friend@example.com', Time.now)
+
# Send the email, then test that it got queued
assert_emails 1 do
- email = UserMailer.create_invite('me@example.com',
- 'friend@example.com', Time.now).deliver_now
+ email.deliver_now
end
# Test the body of the sent email contains what we expect it to