Summary

In this chapter, we have introduced the potential benefits and costs of automated testing, with a focus on the concept of testability, which we defined as the degree to which a system can be verified to work as expected. We learned about the importance of maintaining a positive balance between the benefits of testing and the cost of creating and maintaining tests. We then wrote a couple of simple unit tests and ran them with RSpec. Finally, we looked at different approaches to automated testing, from unit tests to TDD and BDD.

Get RSpec Essentials 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.