thoughtbot/capybara-webkit — pull request #316 by mildavw (2012-04-06 18:39:46+00:00)
Title: Add #server_host to driver

When testing a page that is behind HTTP basic auth, it's handy to have this alternative to #visit:

def auth_visit(path)
url = 'http://%s:%s@%s:%s%s' % [settings.username,
settings.password,
page.driver.server_host,
page.driver.server_port,
path]
visit url
end

To do so, we need to add a #server_host to driver that returns the rack_server.host.