testing

Testing tools, testing philosophy & methodology...
juan caicedo 2018-07-14T18:21:33.000056Z

Hi everyone! I'm working on some test that use a java object. I'm thinking it would be nice to mock that out. I've gathered that reify might be the best way to do this. This is how I'm trying to wire up my test

(let [mock (reify LDClientInterface (allFlags [client ld-user] "flags"))]
      (with-redefs-fn {#'my-ns/init-client (fn [] mock)} ;; line 10
        #(is= (my-ns/foo) false))
      )
However I'm getting this error, which makes me think I'm wiring something wrong
java.lang.ClassCastException: circle.util.test_launchdarkly$fn$reify__106395 cannot be cast to clojure.lang.IFn
  <<stack trace points to line 10>>