Add host variable to allow subdomain testing

I'm using watir-rails to test my application which uses subdomains. I need to be able to set a specific host for the request (even if it's still connecting to 127.0.0.1). Using the url to do that is kind of annoying since you need to retrieve the Rails.port, this solution seems a bit better.