title: Capybara Poltergeist ActionCable testing
body: <p>I wrote an application (<strong>with rails 5.0.0beta3</strong>) which has several live updates using <code>ActionCable</code>.<br>
  So I wanted to test what I wrote. I added <a href="https://github.com/teampoltergeist/poltergeist" rel="nofollow">poltergeist</a> to my Gemfile and bundled it and ran an example.<br>
  Javascript is correctly executed.</p>
  
  <p>But when sprocket tries to add action_cable it fails:</p>
  
  <pre><code>TypeError: 'undefined' is not a function (evaluating 'this.events[eventName].bind(this)')
  TypeError: 'undefined' is not a function (evaluating 'this.events[eventName].bind(this)')
      at http://127.0.0.1:63829/assets/application-2d6ae1aa6efc25d4e4902c5f2d384b5473eb4bdcc9489a9857608e6fe9952eb5.js:12789
  ...
  </code></pre>
  
  <p>I think this comes from <a href="https://github.com/rails/rails/blob/9c2945f4cc1017fc9424f2e425e4820da1ef33b0/actioncable/app/assets/javascripts/action_cable/connection.coffee#L74" rel="nofollow">this line right here</a></p>
  
  <p>If this is not the way to test action cable, how should I do that?</p>