Methods
Included Modules
Instance Public methods
app()
Link
remote_ip(env = {})
Link
# File railties/test/application/middleware/remote_ip_test.rb, line 21 def remote_ip(env = {}) remote_ip = nil env = Rack::MockRequest.env_for("/").merge(env).merge!( 'action_dispatch.show_exceptions' => false, 'action_dispatch.secret_token' => 'b3c631c314c0bbca50c1b2843150fe33' ) endpoint = Proc.new do |e| remote_ip = ActionDispatch::Request.new(e).remote_ip [200, {}, ["Hello"]] end Rails.application.middleware.build(endpoint).call(env) remote_ip end
setup()
Link