From 76d36458eadcb32c233f44065fccfbbef9a58119 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 20 Sep 2013 09:50:07 +0200 Subject: mention controller test base class in testing guide. [ci skip] --- guides/source/testing.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'guides/source') 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 ``` -- cgit v1.2.3