test-check 2019-05-27

Hi, everyone I was wondering how can I use clojure.test/use-fixture with test-checkโ€™s defspec?

How would I emulate the use of fixtures for each trial? Macro/higher order function?

Higher order function is what I've used before.

I ended up writing the following macro:

(defmacro db-fixture [& body]
  `(with-open [node# (db/start-node {})]
     (binding [*node* node#]
       ~@body)))

๐Ÿ‘ 1

@ho0man is your issue that you want the fixture to run around each trial?

Nope, the whole test

But separately for different tests in a single namespace

I think that should just work

:)) Yeah It does Thanks @gfredericks (Sorry to bother you)

๐Ÿ‘ 1