Integration Testing with Capybara and JavaScript

At this point I thought I would be able to say, “Well, we’ve gotten the up and down behavior to work with JavaScript, but we’ve probably broken the Ruby behavior” and use that to launch a discussion of integration testing of Ajax calls. However…

​ 
$ ​rake test:all​
​ 
​# Running tests:​
​ 
​ 
...​...............................................................​
​ 
​ 
Finished tests in 0.917242s, 71.9548 tests/s, 151.5413 assertions/s.
​ 
​ 
66 tests, 139 assertions, 0 failures, 0 errors, 0 skips

The Ruby tests are not failing.

The code still works because we haven’t taken out the server-side links from the up-down tags on the app/views/projects/show.html.erb ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.