clojure.spec guide

Skip to first unread message

Alex Miller

Jul 13, 2016, 2:40:53 PM7/13/16
to Clojure
Back when we released spec we also released the spec guide at

I have been updating this guide for each alpha and also adding new sections. If you haven't looked at it in a while, you might find it worth looking again. Some things that have been added since the early days include:

- unioning map specs with s/merge
- using s/assert for runtime assertions
- using s/exercise-fn
- range specs and generators (s/int-in, s/inst-in, s/double-in)
- how to use and create custom generators 
- how to use clojure.spec.test/check (the function formerly known as both test and check-var)
- how to use instrumented stubs in tandem with check

And a reminder that content on is now maintained on github and accepts issues (from anyone) and PRs (if you have a signed CA). More at . Many thanks to everyone that has provided typo fixes and other updates to the spec guide and other pages.


Reply all
Reply to author
0 new messages