From 206347fd3e33ccf581593a32186e4375639ff43d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 3 Aug 2014 15:12:05 -0700 Subject: Update docs to reflect that helper stubs are no longer generated --- guides/source/command_line.md | 4 ---- guides/source/engines.md | 4 ---- guides/source/generators.md | 4 ---- guides/source/getting_started.md | 3 --- guides/source/testing.md | 12 ++---------- 5 files changed, 2 insertions(+), 25 deletions(-) diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 3a78c3bb3f..a074b849c6 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -149,8 +149,6 @@ $ bin/rails generate controller Greetings hello create test/controllers/greetings_controller_test.rb invoke helper create app/helpers/greetings_helper.rb - invoke test_unit - create test/helpers/greetings_helper_test.rb invoke assets invoke coffee create app/assets/javascripts/greetings.js.coffee @@ -236,8 +234,6 @@ $ bin/rails generate scaffold HighScore game:string score:integer create test/controllers/high_scores_controller_test.rb invoke helper create app/helpers/high_scores_helper.rb - invoke test_unit - create test/helpers/high_scores_helper_test.rb invoke jbuilder create app/views/high_scores/index.json.jbuilder create app/views/high_scores/show.json.jbuilder diff --git a/guides/source/engines.md b/guides/source/engines.md index a5f8ee27b8..e9cce3f159 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -322,8 +322,6 @@ invoke test_unit create test/controllers/blorgh/articles_controller_test.rb invoke helper create app/helpers/blorgh/articles_helper.rb -invoke test_unit -create test/helpers/blorgh/articles_helper_test.rb invoke assets invoke js create app/assets/javascripts/blorgh/articles.js @@ -560,8 +558,6 @@ invoke test_unit create test/controllers/blorgh/comments_controller_test.rb invoke helper create app/helpers/blorgh/comments_helper.rb -invoke test_unit -create test/helpers/blorgh/comments_helper_test.rb invoke assets invoke js create app/assets/javascripts/blorgh/comments.js diff --git a/guides/source/generators.md b/guides/source/generators.md index be64f1638d..5e88fa0c70 100644 --- a/guides/source/generators.md +++ b/guides/source/generators.md @@ -191,8 +191,6 @@ $ bin/rails generate scaffold User name:string create test/controllers/users_controller_test.rb invoke helper create app/helpers/users_helper.rb - invoke test_unit - create test/helpers/users_helper_test.rb invoke jbuilder create app/views/users/index.json.jbuilder create app/views/users/show.json.jbuilder @@ -387,8 +385,6 @@ $ bin/rails generate scaffold Comment body:text create test/controllers/comments_controller_test.rb invoke my_helper create app/helpers/comments_helper.rb - invoke shoulda - create test/helpers/comments_helper_test.rb invoke jbuilder create app/views/comments/index.json.jbuilder create app/views/comments/show.json.jbuilder diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 94711b0a5d..1f91352c82 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -257,8 +257,6 @@ invoke test_unit create test/controllers/welcome_controller_test.rb invoke helper create app/helpers/welcome_helper.rb -invoke test_unit -create test/helpers/welcome_helper_test.rb invoke assets invoke coffee create app/assets/javascripts/welcome.js.coffee @@ -1637,7 +1635,6 @@ This creates six files and one empty directory: | app/views/comments/ | Views of the controller are stored here | | test/controllers/comments_controller_test.rb | The test for the controller | | app/helpers/comments_helper.rb | A view helper file | -| test/helpers/comments_helper_test.rb | The test for the helper | | app/assets/javascripts/comment.js.coffee | CoffeeScript for the controller | | app/assets/stylesheets/comment.css.scss | Cascading style sheet for the controller | diff --git a/guides/source/testing.md b/guides/source/testing.md index fe13c74745..3e12afc000 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -1014,17 +1014,9 @@ Testing helpers In order to test helpers, all you need to do is check that the output of the helper method matches what you'd expect. Tests related to the helpers are -located under the `test/helpers` directory. Rails provides a generator which -generates both the helper and the test file: +located under the `test/helpers` directory. -```bash -$ bin/rails generate helper User - create app/helpers/user_helper.rb - invoke test_unit - create test/helpers/user_helper_test.rb -``` - -The generated test file contains the following code: +A helper test looks like so: ```ruby require 'test_helper' -- cgit v1.2.3