Closed sachinpkale closed 7 years ago
@sachinpkale thanks for this! really cool feature, we appreciate it.
Thanks @JustinC474 Can we push this change to Clojars?
@sachinpkale just published it - https://clojars.org/circleci/bond
Great! Thanks @JustinC474
Sometimes we need to stub with different return value/exception for the same method call. Typical use case could be mocking iterators. Another use case that I faced is testing retries. For example, we are testing a function which makes a network call and on exception, retries once. For testing, we need to mock the network call with two possible outcomes: first it should throw an exception, next time, it should return expected result.