Methods
- A
- C
- H
- I
- P
- R
- U
Constants
DEFAULT_ENV | = | Rack::MockRequest.env_for("/", "HTTP_HOST" => "test.host".b, "REMOTE_ADDR" => "0.0.0.0".b, "HTTP_USER_AGENT" => "Rails Testing".b, ) |
Class Public methods
create(env = {}) Link
Create a new test request with default env
values.
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 15 def self.create(env = {}) env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application env["rack.request.cookie_hash"] ||= {}.with_indifferent_access new(default_env.merge(env)) end