Fork me on GitHub

hey, i am having some troubles using midje to test some code i have


i have ring middleware that rebinds a function (`fetch/get`) depending on stuff in the request map


i would like to mock this out in the tests


but (against-background (fetch/get "foo") => "bar") does not appear to work, and it goes ahead and does the middleware bound (fetch/get)


i can't really follow what's going on in the midje source, so i guessed that maybe midje was rebinding (fetch/get) itself, so I added some metadata {:unassigned true} and only rebound fetch/get in my middleware when that was true. However, it still seems to have this metadata with (against-background) set, so I must have a faulty model in my mind of how midje is working here