New in this release:
– A throws function, which returns an object suitable for use with the stub function that throws the named exception when invoked, as so:
(defprotocol SomeProtocol
(explode [t]))
(let [astub (shrubbery/stub SomeProtocol
{:explode (shrubbery/throws RuntimeException "bang")})]
(explode astub)) ;; throws RuntimeException "bang"
What Shrubbery provides: