Do not hard-code port 80 or things will break for https

This was introduced in 8c6ff168.
This commit is contained in:
Jo Liss 2012-01-10 16:01:29 +01:00
parent 10db15cb21
commit 6d7894b416
1 changed files with 2 additions and 4 deletions

View File

@ -46,10 +46,8 @@ class Capybara::RackTest::Browser
method.downcase! unless method.is_a? Symbol
if new_uri.host
@current_host = new_uri.scheme + '://' + new_uri.host
if new_uri.port != 80
@current_host << ":#{new_uri.port}"
end
@current_host = "#{new_uri.scheme}://#{new_uri.host}"
@current_host << ":#{new_uri.port}" if new_uri.port != new_uri.default_port
end
if new_uri.relative?