Closed mylesmegyesi closed 10 years ago
This PR addresses the following use cases:
Granular expectations
(let [f (stub :the-stub)] (f :one :two) (f :three :four) (should-have-invoked :the-stub {:with [:one :two]}) (should-have-invoked :the-stub {:with [:three :four]}))
Nested stubs
(it "allows for nested should-invoke's" (should-pass! (should-invoke reverse {:times 1} (should-invoke println {:times 1} (println "hello!") (reverse [1 2])))))
This offers a backwards compatible implementation that allows nesting multiple should-invokes. GH-74 tries to accomplish the same thing but unfortunately changes the API of should-invoke.
This PR addresses the following use cases:
Granular expectations
Nested stubs
This offers a backwards compatible implementation that allows nesting multiple should-invokes. GH-74 tries to accomplish the same thing but unfortunately changes the API of should-invoke.