Test drive your Rails applications with this Minitest and fixtures guide.
Testing is an important part of developing quality software. They are lots of opinions on how we should test Rails applications, but I think the answer is a bit nuanced. This book takes a pragmatic and unopinionated stance on testing web applications with Rails well-integrated testing stack.
Like with other things in the Rails Doctrine, Rails offers us Minitest and fixtures on its ‘omasake’ menu. And delicious menu it is! Minitest is easy to learn, read and understand without a complex DSL. Fixtures provides no fuss super fast testing data at your fingertips. What’s not to like?
There are plenty of good testing books out there, but you’ll have hard time finding an up-to-date book on testing Rails applications with the Rails default stack. Looks like the Rails community put Minitest and fixtures on the sideline in favour of RSpec and factories, but not anymore!
I expect you to be already familiar with Rails as this is not a tutorial of building the whole application from scratch. I go straight down to talking about tests with varied examples. Previous knowledge of Minitest is not required.
You’ll get PDF and ePUB copies. The ePUB is tested on Apple Books and Kindle.
The book comes with lifetime updates.
Test Driving Rails is a concise yet incredibly complete guide to the patterns and tools we use to effectively test our Ruby on Rails applications, ensuring that our software does exactly what we said it would, every time we make a change.
– Steven R. Baker, the author of minitest/mock and RSpec
An excellent resource for anyone aiming to master the default Rails testing framework – Minitest and fixtures.
– Juraj Kostolanský, a full-stack Rails developer
I started a new project with factories, but thanks to this book I made my tests 32% faster with fixtures.
– Patrick Barattin, a Rails developer
It’s the perfect book to get you up to speed using the default testing framework for Rails, perfectly complementing the official guides. Short & sweet.
– Andrei Maxim, a Ruby developer