Onward

Minitest has a couple of advantages over RSpec. It’s less complex and is often faster in practice. If you really like the spec-style syntax, you might be interested in the version of it called Minitest::Spec that works in Minitest.[16] We’re not covering Minitest::Spec here because it’s just different enough from RSpec to be confusing.

In the rest of this book I’ll describe how every new library is set up for both RSpec and Minitest. Although the examples will primarily be RSpec, the sample-code download has analogous Minitest examples for all of them in the test directory of each successive version of the application.

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.