The test.generative library divides testing into three key steps:
Generating test inputs
Invoking test functions
Each of these three steps is implemented via functions, which are then composed into tests via the defspec form.
Let’s install test.generative and take it for a spin. Add the following line to your project.clj:
Now execute whatever steps you use to reload project code and meet us at the REPL to generate some test data.
From the REPL, require the generators namespace as follows:
The generators namespace contains functions to generate pseudorandom values for different common datatypes. ...