O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. If we remove the URL and the method attribute, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required