Hello! It has been a couple of months since I announced my latest project, Testing Rails from Scratch: A practical, (mostly) out-of-the-box approach to test-driven development in Ruby on Rails. The book is a thought experiment of sorts, as I revisit the default Rails testing stack after years of RSpec. I’ve been incrementally exploring the defaults and building tests from the foundational building block, on to more complex test cases and tools. This is the same approach I took to learn RSpec to begin with, and the same approach I took in the RSpec book on which Testing Rails from Scratch is based.
It’s been slower-going than I’d planned due to unexpected life circumstances this summer, so I wanted to share what is available now, and what’s left.
Quick plug for anyone still holding off: I’m running a work-in-progress special, $9 for lifetime updates to Testing Rails from Scratch until I’m finished. Purchasing work-in-progress books is a wonderful way to support independent authors, just saying!
As I write this, the first five chapters of the new book are available for purchase on Leanpub. Chapters 1 and 3 are available as a free sample/preview download, no strings attached.
Each chapter builds off the concepts and code from the previous one, and full source code for each chapter is provided.
One interesting thing about my approach is I sometimes learn things as I’m writing and refining that affect future chapters. Case in point, I’d planned a single chapter on test data, decided to split it into two smaller, more digestible chapters. As of now, the remaining material will be broken up as:
Chapter 6 is very close to shipping. The remaining chapters vary in remaining work to be done, mostly based on how much the philosophies and approaches behind Rails defaults vary from my typical RSpec-based setups. I am still hoping to wrap things up by the end of September.
I am really curious about Hanakai as a fresh direction for Ruby. It’s been years since I looked at Hanakai’s early development, and I’d love to take a similar “learn it with me” approach to it that I took with RSpec back in 2012 on this site.
I’ve also had lots of fun over the past year making silly little games with Pico-8. It’s been a nice creative outlet, and a break from agentic engineering every now and then. Picotron keeps the fun and opens the door to more ambitious silliness. Why not share what I learn?
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!
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.