aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2017-03-04 11:53:51 +0100
committerGitHub <noreply@github.com>2017-03-04 11:53:51 +0100
commitb5dc1f6dea1fec088c6af46eba9b675bfb64a72a (patch)
treef9a5191761c3bd1d49d71c5cb414be153065d372 /guides
parentfd3c6eadbbc1fbd4782138a28a87cb96df3ca450 (diff)
parent780434d88fb29543612c05a34a3dc6efbe661909 (diff)
downloadrails-b5dc1f6dea1fec088c6af46eba9b675bfb64a72a.tar.gz
rails-b5dc1f6dea1fec088c6af46eba9b675bfb64a72a.tar.bz2
rails-b5dc1f6dea1fec088c6af46eba9b675bfb64a72a.zip
Merge pull request #28284 from y-yagi/fix_system_test_example
Fx system test example [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 4231500729..f7640d097f 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -610,9 +610,9 @@ For creating Rails system tests, you use the `test/system` directory in your
application. Rails provides a generator to create a system test skeleton for you.
```bash
-$ bin/rails generate system_test users_create_test
+$ bin/rails generate system_test users_create
invoke test_unit
- create test/system/users_create_test.rb
+ create test/system/users_creates_test.rb
```
Here's what a freshly-generated system test looks like:
@@ -620,10 +620,12 @@ Here's what a freshly-generated system test looks like:
```ruby
require "application_system_test_case"
-class UsersCreateTest < ApplicationSystemTestCase
- visit users_url
-
- assert_selector "h1", text: "Users"
+class UsersCreatesTest < ApplicationSystemTestCase
+ # test "visiting the index" do
+ # visit users_creates_url
+ #
+ # assert_selector "h1", text: "UsersCreate"
+ # end
end
```
@@ -1436,7 +1438,7 @@ second batch of assertions, we ensure that the email does indeed contain what we
expect. The helper `read_fixture` is used to read in the content from this file.
NOTE: `email.body.to_s` is present when there's only one (HTML or text) part present.
-If the mailer provides both, you can test your fixture against specific parts
+If the mailer provides both, you can test your fixture against specific parts
with `email.text_part.body.to_s` or `email.html_part.body.to_s`.
Here's the content of the `invite` fixture: