iwmhbq
Last Updated: February 25, 2016
·
757
· martinsvalin

Run all your tests individually

Sometimes my test suite runs fine, but I've really broken an individual test by forgetting to require something. I like to confirm that all my tests can run individually from time to time.

This is a nice oneliner:

find . -name *spec.rb -exec ruby {} \;

My spec/spec_helper.rb:

require 'minitest/spec'
require 'minitest/pride'
require 'minitest/autorun'
lib = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)