Fork me on GitHub

how would i put together a spec for a map with string keys and values that are vectors of strings?

Alex Miller (Clojure team)13:09:36

(s/map-of string? (s/coll-of string? :kind vector?))


is (spec/map-of string? (spec/+ string?)) ok?

Alex Miller (Clojure team)13:09:19

I would recommend coll-of in this case

Alex Miller (Clojure team)13:09:46

it gives you more control over size constraints, generation, etc and is a better match for what you described

Alex Miller (Clojure team)13:09:25

s/+ is for describing sequential collections with internal structure along with the other regex ops. while what you have will work, you’re not really using any of those features


no doubt this has been asked 1k times, but it's probably evolving. what are people currently doing to turn on instrumentation for their test run? top of the file in test_helpers.clj that's required by every test, fixture that's used by every test?

Alex Miller (Clojure team)18:09:43

once fixture seems like a good place for that


makes sense


@bfabry we’re using :once fixtures,


works ok, unless you forget to use the fixture 😕


@bfabry we're using lein profiles and injections - something like this:

:injections   [(require 'clojure.spec.test)
                                             (.println System/err "Instrumented specs")]