For my team, generators and parsing are basically useless with spec. We just don't use them. But describing the shape of data and instrumenting our functions, using defn-spec, to ensure that the data is correct as it flows through the system is exactly what we want and nothing I've seen in Clojure land does it like spec + Orchestra can.
I think part of this may boil down to different types of testing. We primarily use functional testing, especially for our back-end, so we're starting from HTTP and hitting each endpoint as the client would. Then we ensure that the response is correct and any effects we wanted to happen did happen. This is much closer to running production code, but we do it with full instrumentation. Being able to see an error describing exactly how the data is malformed, which function was called, and what the callstack was is such a relief in Clojure.
Call to #'com.okletsplay.back-end.challenge.lol.util/provider-url did not conform to spec.
-- Spec failed --------------------
Function arguments
(nil)
^^^
should satisfy
(->
com.okletsplay.common.transit.game.lol/region->info
keys
set)
-- Relevant specs -------
:com.okletsplay.common.transit.game.lol/region:
(clojure.core/->
com.okletsplay.common.transit.game.lol/region->info
clojure.core/keys
clojure.core/set)
-------------------------
Detected 1 error