diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/testrb | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/bin/testrb b/bin/testrb index f4cd42f443..d03f057224 100755 --- a/bin/testrb +++ b/bin/testrb @@ -1,15 +1,10 @@ #!/usr/bin/env ruby require 'test/unit' -tests = Test::Unit.new {|files| - if files.empty? - puts "Usage: testrb [options] tests..." - exit false - end - if files.size == 1 - $0 = File.basename(files[0]) - else - $0 = files.to_s - end - files -} -exit tests.run(ARGV) || true +tests = Test::Unit::AutoRunner.new(true) +tests.options.banner.sub!(/\[options\]/, '\& tests...') +unless tests.process_args(ARGV) + abort tests.options.banner +end +p files = tests.to_run +$0 = files.size == 1 ? File.basename(files[0]) : files.to_s +exit tests.run |