Testing a gem with minitest Add test dir to gem's root mkdir test Create test/test_helper.rb require 'simplecov' SimpleCov.start require <gem_name> require "minitest/autorun" require "minitest/pride" Create Rakefile require "bundler/gem_tasks" require 'rake/testtask' Rake::TestTask.new do |t| t.libs << "test" t.pattern = "test/*_test.rb" end Create test files require "test_helper" class <gem_name>Test < Minitest::Test def setup end def test_something assert_equal true, foo end def teardown end end Run all tests rake test Running a single test method ruby -Ilib:test <test_file> -n <test_name>