# File lib/action_dispatch/testing/integration.rb, line 190 def url_options @url_options ||= default_url_options.dup.tap do |url_options| url_options.reverse_merge!(controller.url_options) if controller if @app.respond_to?(:routes) && @app.routes.respond_to?(:default_url_options) url_options.reverse_merge!(@app.routes.default_url_options) end url_options.reverse_merge!(:host => host, :protocol => https? ? "https" : "http") end end