aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorप्रथमेश Sonpatki <csonpatki@gmail.com>2016-08-17 08:40:12 +0530
committerGitHub <noreply@github.com>2016-08-17 08:40:12 +0530
commitda06fb48387c57f1d6295756c2749a3ff7e2e884 (patch)
tree9368ab60993993d675e09b1cd6a11529f9a2111c /actionpack/lib
parentc183761f7929bab285416618bf95ad67939ebe4f (diff)
parentb556e2b483019260ece880a157cc6844a8d5163e (diff)
downloadrails-da06fb48387c57f1d6295756c2749a3ff7e2e884.tar.gz
rails-da06fb48387c57f1d6295756c2749a3ff7e2e884.tar.bz2
rails-da06fb48387c57f1d6295756c2749a3ff7e2e884.zip
Merge pull request #25862 from prathamesh-sonpatki/start-documenting-ac-testcase-again
Start documenting ActionController::TestCase again
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/test_case.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 3a6bc92b3c..83c32136dd 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -7,7 +7,6 @@ require "action_controller/template_assertions"
require "rails-dom-testing"
module ActionController
- # :stopdoc:
class Metal
include Testing::Functional
end
@@ -211,10 +210,18 @@ module ActionController
end
# Superclass for ActionController functional tests. Functional tests allow you to
- # test a single controller action per test method. This should not be confused with
- # integration tests (see ActionDispatch::IntegrationTest), which are more like
- # "stories" that can involve multiple controllers and multiple actions (i.e. multiple
- # different HTTP requests).
+ # test a single controller action per test method.
+ #
+ # == Use integration style controller tests over functional style controller tests.
+ #
+ # Rails discourages the use of functional tests in favor of integration tests
+ # (use ActionDispatch::IntegrationTest).
+ #
+ # New Rails applications no longer generate functional style controller tests and they should
+ # only be used for backward compatibility. Integration style controller tests perform actual
+ # requests, whereas functional style controller tests merely simulate a request. Besides,
+ # integration tests are as fast as functional tests and provide lot of helpers such as +as+,
+ # +parsed_body+ for effective testing of controller actions including even API endpoints.
#
# == Basic example
#
@@ -675,5 +682,4 @@ module ActionController
include Behavior
end
- # :startdoc:
end