title: Testing links using rspec?
body: <p>If I have something like <code>&lt;%= link_to "Help", help_path %&gt;</code> in the view file, how do I test the following using rspec?</p>
  
  <ol>
  <li>It goes to <code>help_path</code>.</li>
  <li>The content reads "Help".</li>
  </ol>
  
  <p>I am currently using capybara.</p>
  
  <hr>
  
  <p>edit</p>
  
  <p>While answers below can work, I think I found a simpler way of doing this.</p>
  
  
  
  <pre><code>describe "some link on whatever page" do
    subject { page }
    before { visit whatever_path }
    it { should have_link('Help', href: help_path) }
  end
  </code></pre>