aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-09-20 09:50:07 +0200
committerYves Senn <yves.senn@gmail.com>2013-09-20 09:50:07 +0200
commit76d36458eadcb32c233f44065fccfbbef9a58119 (patch)
treeb8721dfcebeb37b7c4fc5dd72098645046fabd1e /guides
parent3b16d1f1a1ca4c091b3a84b5f6c0175d207c9058 (diff)
downloadrails-76d36458eadcb32c233f44065fccfbbef9a58119.tar.gz
rails-76d36458eadcb32c233f44065fccfbbef9a58119.tar.bz2
rails-76d36458eadcb32c233f44065fccfbbef9a58119.zip
mention controller test base class in testing guide. [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 5b8829b89a..50115607c9 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -438,10 +438,12 @@ Now that we have used Rails scaffold generator for our `Post` resource, it has a
Let me take you through one such test, `test_should_get_index` from the file `posts_controller_test.rb`.
```ruby
-test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:posts)
+class PostsControllerTest < ActionController::TestCase
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:posts)
+ end
end
```