Skip to content

Commit

Permalink
Added documentation about Manipulating the request collections
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Jul 4, 2005
1 parent 07afb1f commit a62485a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions actionpack/lib/action_controller/assertions.rb
Expand Up @@ -27,6 +27,18 @@ module Unit #: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.
Expand Down

0 comments on commit a62485a

Please sign in to comment.