A refactoring of TestResponse to allow the same behavior to be applied to the "real" CgiResponse class in integration tests.
| Public Methods | |
|---|---|
| binary_ |
Returns binary content (downloadable file), converted to a String |
| code | returns a String to ensure compatibility with Net::HTTPResponse |
| cookies | Returns the response cookies, converted to a Hash of (name => CGI::Cookie) pairs Example: |
| error? | was there a server-side error? |
| flash | a shortcut to the flash (or an empty hash if no flash.. hey! that rhymes!) |
| has_ |
do we have a flash? |
| has_ |
does the specified flash object exist? |
| has_ |
do we have a flash that has contents? |
| has_ |
does the specified object exist in the session? |
| has_ |
does the specified template object exist? |
| message | |
| missing? | was the URL not found? |
| redirect? | were we redirected? |
| redirect_ |
returns the redirection location or nil |
| redirect_ |
does the redirect location match this regexp pattern? |
| rendered_ |
returns the template path of the file which was used to render this response (or nil) |
| rendered_ |
was this template rendered by a file? |
| response_ |
the response code of the request |
| server_ |
Alias for #error? |
| success? | was the response successful? |
| template_ |
a shortcut to the template.assigns |
<code/>and<pre/>for code samples.