title: Populate the params hash with capybara webkit
body: <p>I have this route to the <code>user_friendships</code> controller's <code>block</code> action:</p>
  
  <pre><code>block_user_friendship PUT    /user_friendships/:id/block(.:format)     user_friendships#block
  </code></pre>
  
  <p>All you need to know is that the block action requires an <code>:id</code>.</p>
  
  <p>I can test the action's resulting view in an rspec spec like this:</p>
  
  <pre><code>require 'spec_helper'
  it "should not display the names of users who have a state of pending or requested" do
      visit "/user_friendships/1/block"
      page.should have_content("user with id of 1 blocked!")
  end
  </code></pre>
  
  <p>But this is a bit of a brittle spec because the URL is hardcoded. How can I populate the <code>:id</code> entry of the params hash using the <code>block_user_friendship_path</code> variable?</p>
  
  <p>This, for example, doesn't work:</p>
  
  <pre><code>require 'spec_helper'
  it "should not display the names of users who have a state of pending or requested" do
      visit block_user_friendship_path, id: "/23"
      page.should have_content("user with id of 23 blocked!")
  end
  </code></pre>
  
  <p>(Results in        <code>No route matches {:action=&gt;"block", :controller=&gt;"user_friendships"} missing required keys: [:id]</code> )</p>