Minitest Rails
A beginner-friendly guide to testing Rails apps with Minitest. Step by step, one topic at a time.
Build a Recipes app from simple CRUD to models, fixtures, system tests, mailers, jobs, and CI - using Rails defaults and fixtures.
Free for everyone. New chapters added over time.
In an age where AI dominates the headlines, there has never been a more important time for real human in the loop testing. And when it comes to automated testing in Rails, Prabin Poudel is who I trust to get it right.
What you will learn
- 0. Introduction
- 1. Setting up a Rails app with Minitest
- 2. Kinds of Rails tests (and when to use each)
- 3. How to approach testing
- 4. Testing tools in the Minitest world
- 5. Your first test
- 6. Testing a simple CRUD (system tests)
- 7. Testing models
- 8. Test data - fixtures
- 9. Stubs, mocks and doubles (when to use them)
- 10. A second resource and associations
- 11. Request/controller tests (when to use them)
- 12. Authorization testing
- 13. Testing mailers
- 14. Testing background jobs
- 15. Testing with external services
- 16. Adding tests to an existing project
- 17. Test coverage and when to test more
- 18. Habits and TDD
- 19. Running tests in CI
- 20. Finish
Missing a topic? Tell us and we'll consider adding it.
Get notified when new chapters drop
Join the list for updates. No spam - just new guide chapters.
Hi, I am Prabin Poudel
A Ruby on Rails consultant, SaaS owner at Zero Config Rails, open source contributor, and a speaker.
You might have seen me in Twitter (@coolprobn) sharing a lot of Ruby on Rails Tips.
Or maybe you might have found me through my blogs while searching for solutions to Rails problems.
Either way, thank you for your interest in Minitest Rails and stay tuned for more updates!