April 2012
Intermediate to advanced
296 pages
7h 3m
English
The test.generative library divides testing into three key steps:
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:
[org.clojure/test.generative "0.1.3"] |
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:
(require '[clojure.test.generative.generators :as gen]) |
The generators namespace contains functions to generate pseudorandom values for different common datatypes. ...
Read now
Unlock full access