def run_testsuite
test_libs = @libs
test_files = FileList.new
test_files.include(*@files)
if test_files.empty?
puts "No test files found."
return
end
print "Reap is shelling out work to Ruby's Test Suite..."
test_files.each { |f|
$stdout << '.'; $stdout.flush
run_test( f )
}
puts "done."
@failures.reject! { |e| e == [] }
@errors.reject! { |e| e == [] }
puts
puts %{FAILURES:#{@failures.empty? ? ' []' : ''}}
@failures.reverse.each { |fails|
fails.reverse.each { |failure|
puts
puts %{ - test : #{failure.test_name}}
puts %{ location : #{failure.location}}
if failure.message.index("\n")
puts %{ message : >}
puts failure.message.tabto(6)
else
puts %{ message : #{failure.message}}
end
}
}
puts
puts %{ERRORS:#{@errors.empty? ? ' []' : ''}}
@errors.reverse.each { |errs|
errs.reverse.each { |err|
puts
puts %{ - test : #{err.test_name}}
puts %{ message : #{err.exception.message}}
puts %{ backtrace :}
err.exception.backtrace[0...-1].each { |bt| puts %Q{ - #{bt}} }
}
}
puts
puts @results
puts
end