Summary
Tests are one of those things that may seem like a waste of time to write but ultimately pay off in the long run in terms of time regained by preventing bugs from making it into production. The earlier you get test coverage on a type, the better.
In this chapter, we learned how to use the Spec
module to write unit tests and the Athena::Spec
component to write integration tests. Since these are the two most common types of tests, understanding how to write good tests—as well as learning the benefits of why writing tests is such a good idea—can be incredibly helpful in ensuring the overall reliability of an application.
In the next chapter, we are going to take a look at another thing that's just as important as tests—how to document your code/project.