| | 29 | # |
|---|
| | 30 | # == Manipulating the request collections |
|---|
| | 31 | # |
|---|
| | 32 | # The collections described above link to the response, so you can test if what the actions were expected to do happen. But |
|---|
| | 33 | # some times you also want to manipulate these collections in the request coming in. This is really only relevant for sessions |
|---|
| | 34 | # and cookies, though. For sessions, you just do: |
|---|
| | 35 | # |
|---|
| | 36 | # @request.session[:key] = "value" |
|---|
| | 37 | # |
|---|
| | 38 | # For cookies, you need to manually create the cookie, like this: |
|---|
| | 39 | # |
|---|
| | 40 | # @request.cookies["key"] = CGI::Cookie.new("key", "value") |
|---|