今日已更新 344 条资讯 | 累计 37249 条内容
关于我们

Work-in-progress updates on my new book, Testing Rails from Scratch

Aaron Sumner 2026年08月14日 08:02 5 次阅读 来源:Dev.to

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! What's there now 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. An introduction to the problem being solved and my approach to learning and teaching Exploring the default Rails testing setup Testing Active Directory models Addressing DRY in tests, and when not to Using fixtures to create and manage test data Each chapter builds off the concepts and code from the previous one, and full source code for each chapter is provided. What's to come 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: Managing test data with factories Testing units together with integrations Testing end-to-end with system

本文内容来源于互联网,版权归原作者所有
查看原文