Want this course?
Testing with Spec: functions
Spec lets you define function specs, which give you a great place to spec the arguments and return values of functions. In addition, you can define invariants that need to be true between the arguments and return values. A lot of your test.check tests will be able to go right in there. Algebraic properties, though, will not. In this second lesson about Spec integration, we go over how Spec can run automated tests of your functions, how to integrate it in a simple way with clojure.test, and the limits of the Spec tests.