I just shipped a new chapter for the current edition of Everyday Rails Testing with RSpec. In this release, I’ve totally replaced my introduction to testing in isolation with mocks (and stubs, and fakes, and spies, and doubles, oh my). My beliefs on when and how to mock have changed a lot since the last major release of the book, and this updated chapter reflect my newer opinions. I hope you find it useful.
I’ve also realized I forgot to mention an update from a few weeks ago that gets deeper into RSpec’s tools for reducing duplication in tests, when to use them, and which ones to maybe avoid.
Just a couple more chapters to update content-wise! I’m going to take a short break from writing after that, then do some quick updates for whatever’s the latest version of Rails at that point. I haven’t done a ton with Rails 8 yet, but I don’t anticipate a lot of big changes in the book because of it.
As always, this is a free update for anyone who’s got a license for the book on Leanpub–and if you don’t, you can pick yours up starting at $19.
Happy testing, and thanks again for your support!
Ruby on Rails news and tips, and other ideas and surprises from Aaron at Everyday Rails. Delivered to your inbox on no particular set schedule.