class ActionController::TestRequest

def self.create(controller_class)

Create a new test request with default `env` values.
def self.create(controller_class)
  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), new_session, controller_class)
end