Last Updated: January 28, 2019
·
643
· mariochavez

Testing Rails with Minitest

MiniTest is a library for TDD, BDD, mocking and benchmarking, and it has been around for a while now.

In the world of Ruby, Test::Unit and RSpec have been the most popular testing libraries, Test::Unit was bundled as standard library on Ruby, but this has changed with the release of Ruby 1.9 and 2.0, where Test::Unit was replaced with MiniTest.

This replacement has been transparent for whoever uses Test::Unit, because MiniTest offers a layer of compatibility with the first, so if you are still using require 'test/unit', under the hood you are really using MiniTest::Unit.

For people who like better the spec syntax provided by RSpec, MiniTest also provides a MiniTest::Spec which have a syntax like, but with some limitations.

Here is the link to the full post http://bit.ly/14iF5MV