Unit Test Strategies, Mock Objects, and Raphaël

It’s easy to test pure functions and stateful objects. But testing functions with side effects is much harder. We look at three strategies for testing side effects: Asking; Inspecting; and Injecting. We demonstrate the strategies with Raphaël, the vector graphics library, and discuss when to use each one.

comments powered by Disqus