aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-04-19 23:57:43 -0400
committerGitHub <noreply@github.com>2018-04-19 23:57:43 -0400
commitb8cd9302fe01dcaf4d36cc28cdfb7b9d7db832d8 (patch)
tree0686188ad98af44b49ada5c7a15c574e5204ddc1
parentbfd61cbadbeac2002d1bf9bdf4320ac3ad3983f5 (diff)
parent91a58211757f84b06c2e1856c271509d082783dd (diff)
downloadrails-b8cd9302fe01dcaf4d36cc28cdfb7b9d7db832d8.tar.gz
rails-b8cd9302fe01dcaf4d36cc28cdfb7b9d7db832d8.tar.bz2
rails-b8cd9302fe01dcaf4d36cc28cdfb7b9d7db832d8.zip
Merge pull request #32575 from ybakos/guides/testing/pluralize_class_names
guides/testing: Pluralize controller and helper class names.
-rw-r--r--guides/source/testing.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 47a3b26447..82bf38c206 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -1484,7 +1484,7 @@ located under the `test/helpers` directory.
Given we have the following helper:
```ruby
-module UserHelper
+module UsersHelper
def link_to_user(user)
link_to "#{user.first_name} #{user.last_name}", user
end
@@ -1494,7 +1494,7 @@ end
We can test the output of this method like this:
```ruby
-class UserHelperTest < ActionView::TestCase
+class UsersHelperTest < ActionView::TestCase
test "should return the user's full name" do
user = users(:david)
@@ -1600,7 +1600,7 @@ Functional testing for mailers involves more than just checking that the email b
```ruby
require 'test_helper'
-class UserControllerTest < ActionDispatch::IntegrationTest
+class UsersControllerTest < ActionDispatch::IntegrationTest
test "invite friend" do
assert_difference 'ActionMailer::Base.deliveries.size', +1 do
post invite_friend_url, params: { email: 'friend@example.com' }