aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong Bakos <ybakos@humanoriented.com>2018-04-14 10:31:58 -0700
committerYong Bakos <ybakos@humanoriented.com>2018-04-14 10:31:58 -0700
commit91a58211757f84b06c2e1856c271509d082783dd (patch)
treef10a9d43300d363055cbba6668280086ec690324
parent662ba236d115d3e2152b04dcdefdc0ee6f1f6102 (diff)
downloadrails-91a58211757f84b06c2e1856c271509d082783dd.tar.gz
rails-91a58211757f84b06c2e1856c271509d082783dd.tar.bz2
rails-91a58211757f84b06c2e1856c271509d082783dd.zip
guides/testing: Pluralize controller and helper class names.
The Rails convention for controllers and helpers is plural, except where intentionally singular. Pluralize the controller and helper class names, to match convention.
-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 b9b310cbba..8b818c7139 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' }