def run args = []
@verbose = args.delete('-v')
filter = if args.first =~ /^(-n|--name)$/ then
args.shift
arg = args.shift
arg =~ /\/(.*)\// ? Regexp.new($1) : arg
else
/./
end
@@out.puts "Loaded suite #{$0.sub(/\.rb$/, '')}\nStarted"
start = Time.now
run_test_suites filter
@@out.puts
@@out.puts "Finished in #{'%.6f' % (Time.now - start)} seconds."
@report.each_with_index do |msg, i|
@@out.puts "\n%3d) %s" % [i + 1, msg]
end
@@out.puts
format = "%d tests, %d assertions, %d failures, %d errors, %d skips"
@@out.puts format % [test_count, assertion_count, failures, errors, skips]
return failures + errors if @test_count > 0
end