Fork me on GitHub
#clojure-spec
<
2019-11-19
>
colinkahn16:11:12

Awesome! That worked

Lukasz Hall17:11:25

Data generation question - I have a top-level (map) spec composed of many nested specs and their associated generators at a leaf level. Some of the leaves of the nested structures use the same spec as other leaves, and I need those that share a spec to produce the same values when they generate. Is there any way to have this happen without explicitly writing a generator for the top level spec?

Alex Miller (Clojure team)17:11:42

To guarantee properties at the aggregate level, you need to control generation at the aggregate, as a general principle

šŸ‘ 4
telekid20:11:50

Iā€™m curious how people integrate instrumentation with testing. Do they create an instrumentation fixture and call it in a :once block at the top of every test ns? If so, how do you restore instrumentation to its initial state at the end of that fixture?

Alex Miller (Clojure team)20:11:52

unstrument exists to do that

seancorfield21:11:24

@jake142 I instrument directly at the top of a test file (after the ns form) and don't bother undoing it. I do it separately from my test fixtures because those are often functions I reuse across multiple test namespaces, whereas the instrumentation that I do (if any) is usually limited to the functions under test in a specific namespace.

šŸ‘ 4