Chapter 6Test This Fancy New Code

To be confident with new libraries and technologies, we need to do more than just write working code—we 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. We want the same experience testing Angular and database constraints that we get with Rails models and controllers. We 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 there’s no Rails Way for running an end-to-end test in a browser. But Rails is configurable enough to allow us to set it up ourselves. That’s ...

Get Rails, Angular, Postgres, and Bootstrap 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.