Methods
A
C
H
I
N
P
R
U
Constants
DEFAULT_ENV = Rack::MockRequest.env_for('/')
 
Class Public methods
new(env = {})
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 10
def self.new(env = {})
  super
end
new(env = {})
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 14
def initialize(env = {})
  env = Rails.application.env_config.merge(env) if defined?(Rails.application)
  super(DEFAULT_ENV.merge(env))

  self.host        = 'test.host'
  self.remote_addr = '0.0.0.0'
  self.user_agent  = 'Rails Testing'
end
Instance Public methods
accept=(mime_types)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 63
def accept=(mime_types)
  @env.delete('action_dispatch.request.accepts')
  @env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_type| mime_type.to_s }.join(",")
end
action=(action_name)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 43
def action=(action_name)
  path_parameters["action"] = action_name.to_s
end
cookies()
Also aliased as: rack_cookies
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 70
def cookies
  @cookies ||= {}.with_indifferent_access
end
host=(host)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 27
def host=(host)
  @env['HTTP_HOST'] = host
end
if_modified_since=(last_modified)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 47
def if_modified_since=(last_modified)
  @env['HTTP_IF_MODIFIED_SINCE'] = last_modified
end
if_none_match=(etag)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 51
def if_none_match=(etag)
  @env['HTTP_IF_NONE_MATCH'] = etag
end
path=(path)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 39
def path=(path)
  @env['PATH_INFO'] = path
end
port=(number)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 31
def port=(number)
  @env['SERVER_PORT'] = number.to_i
end
rack_cookies()
remote_addr=(addr)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 55
def remote_addr=(addr)
  @env['REMOTE_ADDR'] = addr
end
request_method=(method)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 23
def request_method=(method)
  @env['REQUEST_METHOD'] = method.to_s.upcase
end
request_uri=(uri)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 35
def request_uri=(uri)
  @env['REQUEST_URI'] = uri
end
user_agent=(user_agent)
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 59
def user_agent=(user_agent)
  @env['HTTP_USER_AGENT'] = user_agent
end