class Merb::Test::RequestHelper::FakeRequest
FakeRequest sets up a default enviroment which can be overridden either by passing and env into initialize or using request = 'foo'
Constants
- DEFAULT_ENV
Public Class Methods
new(env = {}, req = StringIO.new)
click to toggle source
Parameters¶ ↑
- env<Hash>
-
Environment options that override the defaults.
- req<StringIO>
-
The request to set as input for Rack.
Calls superclass method
Merb::Request.new
# File lib/merb-core/test/helpers/mock_request_helper.rb, line 13 def initialize(env = {}, req = StringIO.new) env.environmentize_keys! env['rack.input'] = req @start = Time.now super(DEFAULT_ENV.merge(env)) end
new(env = {}, req = StringIO.new)
click to toggle source
Calls superclass method
Merb::Request.new
# File lib/merb-core/test/helpers/mock_request_helper.rb, line 20 def self.new(env = {}, req = StringIO.new) super end