Sha256: 8c58ad71bef83a56ab032da26c32fa0bec40b5c075e0e65435980858fdf0d497
Contents?: true
Size: 838 Bytes
Versions: 9
Compression:
Stored size: 838 Bytes
Contents
#!/usr/bin/env ratch # cross-run unit tests # # This tool runs all tests against each other in pairs # to ensure across the board compatibility. require "./lib/more/facets/progressbar" main :test do output = 'doc/log/isotest.txt' live = ARGV.delete('--live') find = 'test/**/test_*.rb' tests = Dir.glob(find).reject{ |f| dir?(f) } tests = tests.sort{ |a,b| File.basename(a) <=> File.basename(b) } File.open(output, 'w'){ |f| f << "= ISO TESTING\n\n==#{Time.now}\n\n" } total = tests.size pbar = Console::ProgressBar.new("IsoTest", total+1) pbar.inc tests.each do |file| pbar.title = File.basename(file) pbar.inc pbar.flush if live sh %{ruby #{file} >> #{output}} else sh %{ruby -Ilib/more -Ilib/core -Ilib/methods #{file} >> #{output}} end end pbar.finish end
Version data entries
9 entries across 9 versions & 1 rubygems