title: Test if a link does not exist on the page in Rspec/Capybara?
body: <p>I have 2 scenarios in capybara. The first one checks if a link is present on the page and the second one checks if it is absent.</p>
  
  <p>I was able to get the first test passing by using the following method:</p>
  
  <pre><code>expect(page).to have_link('act_id')
  </code></pre>
  
  <p>I tried using the following method for the second test. </p>
  
  <pre><code>expect(page).to not_have_link('act_id')
  </code></pre>
  
  <p>but I am getting following error </p>
  
  <pre><code>NoMethodError: undefined method `not_have_link'
  </code></pre>
  
  <p>How can I test if a link does not exist on the page ??</p>
  
  <p><strong>Ruby version: 2.2</strong></p>
  
  <p><strong>Rails version:  4.2</strong></p>