| Class | Camping::WebTest |
| In: |
lib/mosquito.rb
|
| Parent: | Test |
Used to test the controllers and rendering. The test should be called <App>Test (BlogTest for the aplication called Blog). A number of helper instance variables will be created for you - @request, which will contain a Mosquito::MockRequest object, @response (contains the response with headers and body), @cookies (a hash) and @state (a hash). Request and response will be reset in each test.
Make sure that we are redirected to a certain URL. It‘s not needed to prepend the URL with a mount (instead of "/blog/latest-news" you can use "/latest-news")
Checks both the response status and the url.
Send a DELETE request to a URL. All requests except GET will allow setting verbatim request body as the third argument instead of a hash.
Send a POST request to a URL. All requests except GET will allow setting verbatim request body as the third argument instead of a hash.
Send a PUT request to a URL. All requests except GET will allow setting verbatim request body as the third argument instead of a hash.