title: How can I specify https protocol in routing spec with rspec?
body: <p>In my routes file I have:</p>
  
  <pre><code>resources :subscription, :only =&gt; [:show], :constraints =&gt; {:protocol =&gt; "https"}
  </code></pre>
  
  <p>I'm trying to add a spec for this route like this:</p>
  
  <pre><code>it "recognizes and generates #show" do
    { :get =&gt; "/subscription", :protocol =&gt; 'https' }.should route_to(:controller =&gt; "subscriptions", :action =&gt; "show")
  end
  </code></pre>
  
  <p>However, the spec still fails. 
  If I remove the <code>:protocol =&gt; 'https'</code>, the spec also fails:</p>
  
  <pre>
  ActionController::RoutingError:    
    No route matches "/subscription" 
  </pre>