Skip to content

Commit

Permalink
Fix 10.3 invite_email.body assert_match example.
Browse files Browse the repository at this point in the history
Currently there is no implicit conversion for Mail::Body to string
therefore .to_s must be applied. This is exampled in 10.2.2.
  • Loading branch information
nickpellant committed Jun 30, 2014
1 parent 088b4c3 commit a3a73d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/testing.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ class UserControllerTest < ActionController::TestCase


assert_equal "You have been invited by me@example.com", invite_email.subject assert_equal "You have been invited by me@example.com", invite_email.subject
assert_equal 'friend@example.com', invite_email.to[0] assert_equal 'friend@example.com', invite_email.to[0]
assert_match(/Hi friend@example.com/, invite_email.body) assert_match(/Hi friend@example.com/, invite_email.body.to_s)
end end
end end
``` ```
Expand Down

0 comments on commit a3a73d1

Please sign in to comment.