clojure.spec guide

189 views
Skip to first unread message

Alex Miller

unread,
Jul 13, 2016, 2:40:53 PM7/13/16
to Clojure
Back when we released spec we also released the spec guide at http://clojure.org/guides/spec

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 clojure.org is now maintained on github and accepts issues (from anyone) and PRs (if you have a signed CA). More at http://clojure.org/community/contributing_site . Many thanks to everyone that has provided typo fixes and other updates to the spec guide and other pages.

Alex


Reply all
Reply to author
Forward
0 new messages