CheckOps home

Tools directory

M

CheckOps

Minitest

Minitest is an MIT-licensed, fast and lightweight Ruby testing library providing xUnit-style tests, a spec DSL and benchmarks; it is the default testing framework in Ruby on Rails.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

Minitest provides a complete suite of testing facilities supporting TDD, BDD and benchmarking, according to its README. It is small, fast and written in plain Ruby, which its author contrasts with RSpec: “rspec is a testing DSL. minitest is ruby.” Minitest is the testing library bundled with Ruby and the default framework used by Ruby on Rails, so rails test runs Minitest tests out of the box.

minitest/test provides the classic unit-test style: subclasses of Minitest::Test with methods starting test_ and assertions such as assert_equal, assert_includes, assert_raises and refute_nil. minitest/spec is a functionally complete spec engine layered on the same assertions, with describe and it blocks and expectations such as _(value).must_equal 5. minitest/benchmark lets you assert the performance characteristics of algorithms (for example, that something runs in linear time). Tests run in random order by default to expose order dependencies, and parallel execution is supported (Rails uses it for parallel test workers). Plugins and reporters extend output and integrations. The repository had commits in November 2026.

The source code is at minitest/minitest on GitHub under the MIT licence, with about 3,400 stars; the most recent commit was on 6 November 2026.

Features

  1. Fast and small: Plain Ruby with minimal overhead.
  2. Test and spec styles: Classic assertions or describe/it expectations.
  3. Benchmarks: Assert algorithmic performance.
  4. Rails default: Built into the Rails testing stack.

Pros

  1. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 6 November 2026.
  3. Community: About 3,400 GitHub stars.

Cons

  1. Fewer built-in conveniences: Less DSL sugar than RSpec (shared contexts, rich matchers).
  2. Plugin hunting: Some features need third-party gems.
# test/cart_test.rb
require "minitest/autorun"
require_relative "../lib/cart"

class CartTest < Minitest::Test
  def setup
    @cart = Cart.new
  end

  def test_starts_empty
    assert_empty @cart.items
  end

  def test_totals
    @cart.add(price: 5)
    @cart.add(price: 7)
    assert_equal 12, @cart.total
  end
end

describe Cart do
  it "rejects negative prices" do
    _ { Cart.new.add(price: -1) }.must_raise ArgumentError
  end
end
ruby -Itest test/cart_test.rb
bin/rails test   # in Rails apps

Resources:

Pricing

Minitest is free and open source under the MIT licence.

  1. Rails teams using the default testing stack.
  2. Ruby developers who prefer plain Ruby over a testing DSL.

Conclusion

Minitest is Ruby’s fast, simple and capable testing library, and the default choice for Rails applications.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with Minitest side by side.