title: rspec route testing and hosts
body: <p>I see I can test routes with rspec like this:</p>
  
  <pre><code>get("/").should route_to("welcome#index")
  </code></pre>
  
  <p>but I have constraints based on the hostname or parts of hostnames and redirects between several ones. How do I specify a hostname when testing?</p>
  
  <p>How do I run the tests with proper configuration? I tried printing root_url and I got:</p>
  
  <blockquote>
    <p>Missing host to link to! Please provide the :host parameter, set
    default_url_options[:host], or set :only_path to true</p>
  </blockquote>