title: RSpec Request Spec - missing required keys: [:id]
body: <p>I'm getting an error when running my tests that I can't quite figure out.</p>
  
  <pre><code>#The error
  Failure/Error: get post_path, {id: 1}
   ActionController::UrlGenerationError:
     No route matches {:action=&gt;"show", :controller=&gt;"posts"} missing required keys: [:id]
  </code></pre>
  
  <p>Below is the spec.</p>
  
  <pre><code>#spec/requests/visitor_interaction_spec.rb
  
  require 'rails_helper'
  
  RSpec.describe 'Visitor', :type =&gt; :request do
    context 'following a post link' do
      it 'should redirect to the post' do
        get post_path, {id: 1}
        expect(response).to render_template(:show)
      end
    end
  end
  </code></pre>
  
  <p>If I replace <code>get post_path, {id: 1}</code> with <code>get "posts/1"</code> then the test passes as expected</p>