Left of the Dev

New book: Testing Rails from Scratch

By Aaron Sumner, June 21, 2026. File under: , , .

I never intended to write another testing book. At least not on Rails–most of my day job work entails languages and frameworks that don’t necessarily spark joy, but pay the bills. But I still keep some Ruby side projects going, including one I made a conscious decision to wait on for testing. But the application’s at a point now where it’s likely not going away for a bit, so it’s time to backfill coverage. And if you’re at all familiar with my own learning-how-to-test story, you may have heard this refrain before!

Many, many years ago now, when I first began working with Rails, the out-of-the-box testing experience was much different. It was not the developer-friendly tooling we may take for granted today. Then RSpec came along, and then Noel Rappin wrote some excellent books on it. I built a structured approach to teaching myself to test, one building block at a time. I wrote about it here, and it resonated with lots of people–and like that, Everyday Rails Testing with RSpec was born.

Testing Rails from Scratch book cover

As I said, the testing tools provided by a default Rails installation are worlds better in 2026. Minitest, in particular, is excellent! Here’s where I kicked off my thought experiment: Does the approach I took to learn TDD, and go on to teach thousands of readers to do the same, apply to a modern Rails testing stack? And here we have my latest book, Testing Rails from Scratch.

It started as a port of my RSpec book, but as I continue writing, it’s taking a life of its own. The scratch stack is better in some ways, and presents challenges in others (I still much prefer factories over fixtures, sorry not sorry). And you know what? It’s also influencing my approach to RSpec! In good ways–the default stack’s limitations are, in several ways, strengths. So watch for changes in future versions of my RSpec book, too.

First release now on Leanpub

If this sounds interesting, the first three chapters of Testing Rails from Scratch are available now on Leanpub, my favorite platform for independent publishing. New chapters will be released incrementally over the next several weeks.

I really hope you’ll check out this new work and let me know what you think! It’s been a fun project and I’m looking to see where it goes.

Test Rails apps (mostly) out of the box!

Join me on a thought experiment: How does my time-tested approach to testing Ruby on Rails applications apply to the tools we get from the framework? Whether you're new to Rails testing, or curious about the default testing stack, Testing Rails from Scratch gives you a pragmatic, end-to-end introduction to test-driven development. Covers Rails 8.1 and Ruby 4.0. Early release now available for sale on Leanpub!

Test with confidence!

If you liked my series on practical advice for adding reliable tests to your Rails apps, check out the expanded ebook version. Lots of additional, exclusive content and a complete sample Rails application. Updated in 2026 to Rails 8.1 and Ruby 4.0!

Newsletter

Software development news and tips, and other ideas and surprises from Aaron at Left of the Dev. Delivered to your inbox on no particular set schedule.