How to return, raise, or yield a value from your double
How to supply custom behavior for your double
How to ensure your double is called with the right arguments
How to make sure your double is called the right number of times and in the right order
Chapter
14 Customizing Test Doubles
Now that you’ve got a handle on the basic types of test doubles and
when to use them, we’re going to dive into the rspec-mocks API for a
bit. Our goal isn’t to give you an exhaustive API reference here;
that’s what the docs are for.[97]
Instead, we’re going to show you the basics, and then give a few
recipes for specific situations.