We’ll start with an empty Ledger class. In your project directory, create a new file called app/ledger.rb with the following contents:
|||RecordResult = Struct.new(:success?, :expense_id, :error_message)|
Notice we’ve also moved the temporary RecordResult struct definition from earlier into its permanent home here. Don’t forget to delete the old version of RecordResult from spec/unit/app/api_spec.rb.
You’ll need to require this new file from app/api.rb:
The specs you have so far are still using the fake ledger. They passed without a real Ledger ...