In this tutorial, we will learn how to test Ruby on Rails applications with Minitest. We’ll cover how to do use Minitest’s mocks and stubs to improve the performance of your tests.

Once we understand how testing works, we’ll set up a Continuous Integration (CI) pipeline with Semaphore to speed up development.


To follow this tutorial, you’ll need Ruby installed along with Rails. This tutorial was tested using Ruby version 2.7, Rails version 6.0, and Minitest version 5.14.

To get started you can use gem install rails, and you should be good to go, provided you have Ruby installed:

$ gem install rails

What is Minitest?

Minitest is a complete testing suite for Ruby, supporting test-driven development (TDD), behavior-driven development (BDD), mocking, and benchmarking. It’s small, fast, and it aims to make tests clean and readable.

If you’re new to Minitest, then you can take a look at our tutorial on getting started…


Continue reading on source link