# File lib/capybara/session.rb, line 166 def visit(url) @touched = true if url !~ /^http/ and Capybara.app_host url = Capybara.app_host + url.to_s end if @server url = "http://#{@server.host}:#{@server.port}" + url.to_s unless url =~ /^http/ if Capybara.always_include_port uri = URI.parse(url) uri.port = @server.port if uri.port == uri.default_port url = uri.to_s end end driver.visit(url) end