Fork me on GitHub

at risk of asking an obvious question: how do I refer to a spec from another namespace? here's an example: in namespace-0, I have some specs defined using (s/def ::consistent ...). In namespace-1, I am using (:require [namespace-0)], but making calls to the specs in the other namespace by doing something like (s/valid :namespace-0/consistent data) fails with a Unable to resolve spec :namespace-0/consistent. How do I refer to these specs from another namespace using fully qualified keys?


actually, it works as expected using the fully qualified keys. my issue was just a typo in the spec name. 😑


Is this how :gen-max is supposed to work? It appears to be a bug.

(distinct (map count
                 (s/gen (s/map-of string? string?
                                  :min-count 1
                                  :gen-max 1)) 100)))
=> (1 2)


Ah, ok. Switched everything to use :gen-max and generators got 2-2.5x slower 😬


I think a lot of places are only generating one item now generate up to 2.