Pre-release
$14.99

Test Driving Rails

The Minitest and fixtures guide for testing Rails applications.

From beta readers

"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

Chapters

1. Introduction

Getting started.

2. Minitest

Introduction to Minitest

3. Doubles

Mocks, Stubs, Mocha, constants.

4. Testing Rails

The Rails test layout.

5. Fixtures

Building test data with fixtures.

6. Model tests

Testing models and business logic.

7. Integration tests

Testing controllers and flows.

8. System tests

Testing with browsers.

9. CI

Continues integration.

10. Reference

A handy reference.

11. Fin

What did we learn.

Check out the preview

Buy a copy

Get pre-release for $14.99 + local tax

FAQ

Which versions of Rails are covered?

The 1st edition of the book targets the currently unreleased Rails 8.

Who is the book for?

The book is designed for Rails beginners and professionals alike, but basic knowledge of Rails is assumed. Previous experience with Minitest or fixtures is not required.

Is Minitest worth it if I use RSpec?

Minitest is seemlesly integrated with Rails from the get-go. You don't need to update your gemfile or think about specific features when they come out.

What about factories?

This book talks exclusively about building test data with Rails fixtures. They are fast and reusable datasets for different tasks across development, test, and production.

Buy now

Get pre-release for $14.99 + local tax

Author

Hello, I am Josef Strzibny, a freelance Rails consultant previously working for companies like Red Hat and Phrase. I always had a soft spot for the default Rails testing stack and now I can take you for this joyful ride with me. Testing should be fun.