Fork me on GitHub
#clojure-spec
<
2016-08-24
>
tgk06:08:22

I’m sure my googling skills are just sub-par but I can’t seem to find an obvious way of running (clojure.spec.test/test) from lein e.g. as part CI integration

tgk06:08:44

Maybe everyone has switched to boot while I wasn’t looking 😉

tgk07:08:28

The approach I’m taking now is to have a spec-test namespace loaded in dev environments and run -main using lein run -n spec-test/-main (or an alias) and have -main run clojure.spec.test/check and analyse the result. I guess this might be the obvious way of doing this.

magnetophon07:08:05

Is it expected behavior that s/unform doesn't descend into vectors? IOW:

(s/def ::test-type (s/coll-of (s/cat :test-val int? )))
(s/conform ::test-type (s/unform ::test-type (s/conform ::test-type (gen/generate (s/gen ::test-type )))))
gives an error because the outer conform gets passed :test-val plus the actual value.

magnetophon08:08:43

@alexmiller I just noticed your response. Thanks, all clear now.