Initialize @trusted_proxies.

This commit is contained in:
Emilio Tagua 2010-09-28 16:25:06 -03:00
parent eea61a030e
commit dc37bd778a

@ -474,6 +474,7 @@ class RequestTest < ActiveSupport::TestCase
def stub_request(env = {})
ip_spoofing_check = env.key?(:ip_spoofing_check) ? env.delete(:ip_spoofing_check) : true
@trusted_proxies ||= nil
ip_app = ActionDispatch::RemoteIp.new(Proc.new { }, ip_spoofing_check, @trusted_proxies)
tld_length = env.key?(:tld_length) ? env.delete(:tld_length) : 1
ip_app.call(env)