Fork me on GitHub
#clojure-spec
<
2018-06-13
>
ackerleytng12:06:57

is there a way to write and use stest/instrument or stest/check on a function in a record?

mpenet12:06:41

nope, if you have to do that you need to wrap it

mpenet12:06:54

(which is not free)

ackerleytng12:06:34

what do you mean by wrap it with another function?

mpenet12:06:49

(defprotocol IFoo
  (-foo [x]))

(def foo -foo)
(s/fdef foo :args (s/cat))

mpenet12:06:15

I don't think you can spec and instrument a protocol fun otherwise