From 7ddf72d008ed35562401034e78e589b138c3041a Mon Sep 17 00:00:00 2001 From: Konstantinos Rousis Date: Fri, 28 Aug 2015 09:18:52 +0200 Subject: fix reference to undefined variable in email testing guide [ci skip] --- guides/source/testing.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'guides/source/testing.md') 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 -- cgit v1.2.3