In this chapter, you’ve clarified exactly how your API is supposed to behave. You’ve spelled out what happens when storing an expense record succeeds or fails, using a test double to stand in for the unwritten persistence layer. You’ve refactored your specs so that they spell out exactly what behavior you’re testing. Finally, you’ve used the design suggested by your tests to guide the interface of a real object.
Now, it’s time to put these new skills to the test. Don’t skip this one; you’re going to build on this work in the next chapter.
In these exercises, you’re going to implement another key piece of your application at the routing layer. Along the way, you’ll be looking for opportunities to share code.