#!/usr/bin/env ruby # Run unit tests live = ARGV.delete('--live') unless live $LOAD_PATH.unshift(File.expand_path('lib')) end if find = ARGV[0] unless File.file?(find) find = File.join(find, '**', 'test_*.rb') end else find = 'test/**/test_*.rb' end Dir.glob(find).each do |file| next if File.directory?(file) load file end