diff options
| author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-04 09:47:52 +0000 | 
|---|---|---|
| committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-04 09:47:52 +0000 | 
| commit | a62485a0896c60a0c543e64a7f24ea37772bf97d (patch) | |
| tree | 29a780c800da82784c0f7ecfea1f98a475d01d4c /actionpack/lib/action_controller | |
| parent | 07afb1fd42695b8b2898ba4d51e2d7fd9426ae95 (diff) | |
| download | rails-a62485a0896c60a0c543e64a7f24ea37772bf97d.tar.gz rails-a62485a0896c60a0c543e64a7f24ea37772bf97d.tar.bz2 rails-a62485a0896c60a0c543e64a7f24ea37772bf97d.zip | |
Added documentation about Manipulating the request collections
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
| -rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index b412b625ca..cb8d0e79ae 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -27,6 +27,18 @@ module Test #:nodoc:      # For redirects within the same controller, you can even call follow_redirect and the redirect will be follow triggering another      # action call which can then be asserted against.      # +    # == Manipulating the request collections +    # +    # The collections described above link to the response, so you can test if what the actions were expected to do happen. But +    # some times you also want to manipulate these collections in the request coming in. This is really only relevant for sessions +    # and cookies, though. For sessions, you just do: +    # +    #   @request.session[:key] = "value" +    # +    # For cookies, you need to manually create the cookie, like this: +    # +    #   @request.cookies["key"] = CGI::Cookie.new("key", "value") +    #      # == Testing named routes      #      # If you're using named routes, they can be easily tested using the original named routes methods straight in the test case. | 
