An excellent introduction to Ruby on Rails is Agile Web Development with Rails 4 by Sam Ruby. Around half of the book is devoted to building the “depot” application: a simple web-based shopping cart application.

A fundamental part of building this application is writing tests. But the book uses the default Rails testing framework. What if you want to learn how to write tests with RSpec instead?

I recently worked through the book, but wrote equivalent tests in RSpec as I went along. I make no claims to have done everything the “right” way, but I think I covered all of the tests in the book, and they work!

I’ve just pushed my version of the application to GitHub as depot_rspec. Hopefully it might be useful to some people out there…