Class | Rack::MockRequest |
In: |
lib/rack/mock.rb
|
Parent: | Object |
Rack::MockRequest helps testing your Rack application without actually using HTTP.
After performing a request on a URL with get/post/put/delete, it returns a MockResponse with useful helper methods for effective testing.
You can pass a hash with additional configuration to the get/post/put/delete.
:input: | A String or IO-like to be used as rack.input. |
:fatal: | Raise a FatalWarning if the app writes to rack.errors. |
:lint: | If true, wrap the application in a Rack::Lint. |
DEFAULT_ENV | = | { "rack.version" => [1,1], "rack.input" => StringIO.new, "rack.errors" => StringIO.new, "rack.multithread" => true, "rack.multiprocess" => true, "rack.run_once" => false, } |