Chapter 10. Test-driven development and more
This chapter covers
- An introduction to unit testing Clojure
- Writing test-driven Clojure code
- Mocking and stubbing code in Clojure
- Improving test organization
Test-driven development (TDD) has become something of the norm on most software development projects. It’s easy to understand why, because TDD has several advantages. It allows the programmer to look at code being developed from the point of view of a consumer, which results in a more useful design when compared with a library that might be designed in relative isolation. Further, because code developed using TDD must be testable (by definition), the resulting design is often better in terms of lower coupling as well. Finally, the suite ...
Get Clojure in Action, Second Edition 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.