diff options
author | Sunny Ripert <sunny@sunfox.org> | 2011-11-17 17:05:53 +0100 |
---|---|---|
committer | Sunny Ripert <sunny@sunfox.org> | 2011-11-17 17:05:53 +0100 |
commit | 8d17af23ef5202e7c28bbf701e247bce6011df07 (patch) | |
tree | d54c3e2f4202bc520721ac1503e887712b2f3123 /railties/guides/source | |
parent | 64a3175eea3c121f30a5a24034aa1ed400c80b12 (diff) | |
download | rails-8d17af23ef5202e7c28bbf701e247bce6011df07.tar.gz rails-8d17af23ef5202e7c28bbf701e247bce6011df07.tar.bz2 rails-8d17af23ef5202e7c28bbf701e247bce6011df07.zip |
Guides: better example to find the last sent email
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/testing.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile index 2341a3522c..5dbbe2c0f0 100644 --- a/railties/guides/source/testing.textile +++ b/railties/guides/source/testing.textile @@ -927,7 +927,7 @@ class UserControllerTest < ActionController::TestCase assert_difference 'ActionMailer::Base.deliveries.size', +1 do post :invite_friend, :email => 'friend@example.com' end - invite_email = ActionMailer::Base.deliveries.first + invite_email = ActionMailer::Base.deliveries.last assert_equal "You have been invited by me@example.com", invite_email.subject assert_equal 'friend@example.com', invite_email.to[0] |