class Rails::TestUnitReporter

Constants

COLOR_BY_RESULT_CODE

Public Instance Methods

# File railties/lib/rails/test_unit/reporter.rb, line 53
def filtered_results
  if options[:verbose]
    results
  else
    results.reject(&:skipped?)
  end
end
Calls superclass method
# File railties/lib/rails/test_unit/reporter.rb, line 11
def prerecord(test_class, test_name)
  super
  if options[:verbose]
    io.print "%s#%s = " % [test_class.name, test_name]
  end
end
Calls superclass method
# File railties/lib/rails/test_unit/reporter.rb, line 18
def record(result)
  super

  if options[:verbose]
    io.puts color_output(format_line(result), by: result)
  else
    io.print color_output(result.result_code, by: result)
  end

  if output_inline? && result.failure && (!result.skipped? || options[:verbose])
    io.puts
    io.puts
    io.puts color_output(result, by: result)
    io.puts
    io.puts format_rerun_snippet(result)
    io.puts
  end

  if fail_fast? && result.failure && !result.skipped?
    raise Interrupt
  end
end
# File railties/lib/rails/test_unit/reporter.rb, line 61
def relative_path_for(file)
  if app_root
    file.sub(/^#{app_root}\/?/, "")
  else
    file
  end
end
# File railties/lib/rails/test_unit/reporter.rb, line 41
def report
  return if output_inline? || filtered_results.empty?
  io.puts
  io.puts "Failed tests:"
  io.puts
  io.puts aggregated_results
end