O'Reilly logo

Rails, Angular, Postgres, and Bootstrap, 2nd Edition by David B. Copeland

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

Chapter 7Test This Fancy New Code

To be confident with new libraries and technologies, you need to do more than just write working code—you have to be able to test it. Rails has a long history of supporting and encouraging testing, providing many useful features for testing every part of your application. You want the same experience testing Angular and database constraints that you get with Rails models and controllers. You also want a seamless experience testing end to end in a browser.

Rails has no built-in support for testing JavaScript, nor does it provide a direct way to test database constraints. And, up until Rails 5.1, there was no Rails Way for running an end-to-end test in a browser. But Rails is configurable enough to allow us ...

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