Upgrading to Clojure 1.3, I need to replace some binding-based mocks with 1.3-friendly mocking. The mock library seems to be useful for replacing instances where I was formerly using binding to mock a function call within a function I’m unit testing, however there are some cases where what I want to mock is a var that is bound to some data. What would be a good way to do this in Clojure 1.3?
Upgrading to Clojure 1.3, I need to replace some binding-based mocks with 1.3-friendly mocking.
Share
with-redefswas introduced for the same purpose in Clojure-1.3.