When I make a test using an outer let clause to structure some definitions and calls, the stubs don't work the way I'd expect. For example:
This test fails
(fact "blah"
(let [x (meth1 123)]
x => 246
(provided
(meth2 123) => 246)))
With this code
(defn meth2 [x]
(prn "meth2" x)
(* 3 x))
(defn meth1 [x]
(let [y (meth2 x)]
y))
Am I not supposed to use let
statements with midje? I can't understand how to get these to pass without removing the let
.