Chapter 17. Testing
It’s not that Rails encourages you to do test-driven development, it’s that it makes it difficult for you to not do test-driven development.
Automated tests allow us to verify the functionality of our application, prevent regression (introduction of new and previously fixed bugs), and help us to keep our code flexible. Test coverage refers to the quality and number of automated tests that we have in relation to production code. When our test coverage is deficient, there is no proof that the system works as intended. We could change something that breaks the application, and not notice the failure until much time has passed, when it will be much more difficult to diagnose ...
Get The Rails Way 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.