aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2015-05-13 18:28:33 +0800
committerGuo Xiang Tan <tgx_world@hotmail.com>2015-05-30 14:13:57 +0800
commitca83436d1b3b6cedd1eca2259f65661e69b01909 (patch)
tree7a25da4004c50ed7b1cd8056dc912aa16ce14c29 /actionpack/lib/action_controller/test_case.rb
parent109e71d2bb6d2305a091fe7ea96d4f6e9c7cd52d (diff)
downloadrails-ca83436d1b3b6cedd1eca2259f65661e69b01909.tar.gz
rails-ca83436d1b3b6cedd1eca2259f65661e69b01909.tar.bz2
rails-ca83436d1b3b6cedd1eca2259f65661e69b01909.zip
Remove `assigns` and `assert_template`.
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index bd88b20cea..616a6d121c 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -218,21 +218,15 @@ module ActionController
# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions
# can be used against. These collections are:
#
- # * assigns: Instance variables assigned in the action that are available for the view.
# * session: Objects being saved in the session.
# * flash: The flash objects currently in the session.
# * cookies: \Cookies being sent to the user on this request.
#
# These collections can be used just like any other hash:
#
- # assert_not_nil assigns(:person) # makes sure that a @person instance variable was set
# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave"
# assert flash.empty? # makes sure that there's nothing in the flash
#
- # For historic reasons, the assigns hash uses string-based keys. So <tt>assigns[:person]</tt> won't work, but <tt>assigns["person"]</tt> will. To
- # appease our yearning for symbols, though, an alternative accessor has been devised using a method call instead of index referencing.
- # So <tt>assigns(:person)</tt> will work just like <tt>assigns["person"]</tt>, but again, <tt>assigns[:person]</tt> will not work.
- #
# On top of the collections, you have the complete url that a given action redirected to available in <tt>redirect_to_url</tt>.
#
# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another