Replace hardcoded `localhost` in spec helper

Hi, one of the maintainers of capybara-mechanize here. This test had a hardcoded values for the URI to visit which varies for different test cases. When these specs are integrated in custom driver's test suite like capybara-mechanize, it leads to failures. In addition, the remainder of the tests in this file also use `root_uri.host` rather than `localhost`.

This replaces #1227, which was rejected for changing the original purpose of the test. However, this patch only changes the hardcoding. It will allow https://github.com/jeroenvandijk/capybara-mechanize/issues/55 to proceed and bump it's compatibility to beyond capybara 2.1.

Thanks!