aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2014-12-22 03:24:22 -0800
committerZachary Scott <e@zzak.io>2014-12-22 03:24:22 -0800
commit0145cc6e504f1c87eddc8aef5a6c6d0aca806594 (patch)
tree209611d302f3ec158e1057df6ef1879fed335081 /guides/source
parent2d224a6b6765b350ce508257836a04b9f85159cb (diff)
downloadrails-0145cc6e504f1c87eddc8aef5a6c6d0aca806594.tar.gz
rails-0145cc6e504f1c87eddc8aef5a6c6d0aca806594.tar.bz2
rails-0145cc6e504f1c87eddc8aef5a6c6d0aca806594.zip
Better explain how test() methods get defined and kill this run-on sentence.
[ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/testing.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 5eea4b7c38..494a8b0e44 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -184,9 +184,9 @@ class ArticleTest < ActiveSupport::TestCase
The `ArticleTest` class defines a _test case_ because it inherits from `ActiveSupport::TestCase`. `ArticleTest` thus has all the methods available from `ActiveSupport::TestCase`. Later in this guide, you'll see some of the methods it gives you.
Any method defined within a class inherited from `Minitest::Test`
-(which is the superclass of `ActiveSupport::TestCase`) that begins with `test_` (case sensitive) is simply called a test. So, `test_password` and `test_valid_password` are legal test names and are run automatically when the test case is run.
+(which is the superclass of `ActiveSupport::TestCase`) that begins with `test_` (case sensitive) is simply called a test. So, methods defined as `test_password` and `test_valid_password` are legal test names and are run automatically when the test case is run.
-Rails adds a `test` method that takes a test name and a block. It generates a normal `Minitest::Unit` test with method names prefixed with `test_`. So,
+Rails also adds a `test` method that takes a test name and a block. It generates a normal `Minitest::Unit` test with method names prefixed with `test_`. So you don't have to worry about naming the methods, and you can write something like:
```ruby
test "the truth" do