Midje provided not stubbing function in Compojure / Ring handler
问题 I'm attempting to use Midje to stub the view in a handler unit test, but my use of Midje's (provided) obviously isn't correct. I've simplified and inlined the view to a (content) function in the handler: (ns whattodo.handler (:use compojure.core) (:require [whattodo.views :as views])) (defn content [] (views/index)) (defn index [] (content)) (defroutes app (GET "/" [] (index))) and am trying to test it using (ns whattodo.t-handler (:use midje.sweet) (:use ring.mock.request) (:use whattodo