diff options
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/testing.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index 943074a3d4..0f24bd0311 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -530,7 +530,7 @@ Let me take you through one such test, `test_should_get_index` from the file `ar ```ruby # articles_controller_test.rb class ArticlesControllerTest < ActionController::TestCase - test_should_get_index do + def test_should_get_index get :index assert_response :success assert_includes @response.body, 'Articles' @@ -572,7 +572,7 @@ NOTE: If you try running `test_should_create_article` test from `articles_contro Let us modify `test_should_create_article` test in `articles_controller_test.rb` so that all our test pass: ```ruby -test_should_create_article do +def test_should_create_article assert_difference('Article.count') do post :create, params: { article: { title: 'Some title' } } end |