1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
task default: %w[test] task :test do failed = false Dir["./tests/*.rb"].each do |test_file| begin ruby test_file puts "" rescue puts "FAILED #{test_file}!" puts "" failed = true end end if failed exit 0 end end