Even this simple app has several pieces. It’s easy to feel overwhelmed as we’re deciding what to test first. Where do we start?
To drive the first example, ask yourself: what’s the core of the project? What’s the one thing we agree our API should do? It should faithfully save the expenses we record.
Let’s encode the first part of that desired behavior in a spec, and then implement the behavior. Place the following code in spec/acceptance/expense_tracker_api_spec.rb:
|||RSpec.describe 'Expense Tracker API' do|
|||it 'records submitted ...|