Using midje provided in a let clause doesn't stub methods
问题 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 . 回答1: First of all, your test would even fail if