title: How to test custom routes in controller with rspec
body: <p>I have defined a custom route in 
  routes.rb</p>
  
  <pre><code>get "packages/city/:location_id",  to: "packages#index"
  </code></pre>
  
  <p>In <code>controller_spec.rb</code>, </p>
  
  <pre><code>get :index
  </code></pre>
  
  <p>gives this error,</p>
  
  <pre><code>ActionController::UrlGenerationError:
     No route matches {:action=&gt;"index", :controller=&gt;"packages"}
  </code></pre>
  
  <p>How to explicitly specify the custom routes in controller specs?</p>