title: Capybara: Test that JavaScript runs without errors
body: <p>I would like to write a request spec that verifies the loading and execution of javascript on a given page without any errors.</p>
  
  <p>I know I can add something to the DOM at the end of my JavaScript file and assert the presence of this content, but that feels like a hack and forces me to pollute my code for testing reasons. I'd prefer to do something along the lines of.</p>
  
  <pre><code>visit some_path
  page.should succesfully_run_javascript
  </code></pre>