# File lib/reap2/test-task.rb, line 32
  def run_testsuite
    # get test files
    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 )
      #ruby %{-r"test/unit" "#{f}"}
    }
    puts "done."

    # Don't know why empty arrays get in them yet, but...
    @failures.reject! { |e| e == [] }
    @errors.reject! { |e| e == [] }

    # Display Failures
    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
      }
    }

    # Display Errors
    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}} }
      }
    }

    # Display Final Results
    puts
    puts @results
    puts

    # old way (don't work right)
    #puts %Q{ ruby %{-I#{test_libs} -e0 -r"test/unit" \\\n#{test_reqs}#{test_opts}} } if $DEBUG
    #ruby %{-I#{test_libs} -e0 -r"test/unit" \\\n#{test_reqs}#{test_opts}}
    #ruby %{-e0 -r"test/unit" \\\n#{test_reqs}#{test_opts}}
  end