ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
hindol 2020-05-19T15:05:41.010400Z

Hi, I am pretty new to both spec and ghostwheel, so this might be something trivial. I have a function path? that I want to use as a spec.

(>defn path?
  [p]
  [any? => boolean?
   <- (gen/fmap #(path %) (gen/string))]
  (instance? Path p))
Is this the right way to associate a generator? I have tested the generator (gen/fmap #(path %) (gen/string)) works by itself. But when I specify path? as a spec in any other function, it complains. What am I doing wrong?