Class: Rails::TestUnitReporter
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Minitest::StatisticsReporter
|
|
Instance Chain:
self,
Minitest::StatisticsReporter
|
|
Inherits: |
Minitest::StatisticsReporter
|
Defined in: | railties/lib/rails/test_unit/reporter.rb |
Constant Summary
-
COLOR_BY_RESULT_CODE =
# File 'railties/lib/rails/test_unit/reporter.rb', line 100{ "." => codes[:green], "E" => codes[:red], "F" => codes[:red], "S" => codes[:yellow] }
Class Attribute Summary
Instance Attribute Summary
Instance Method Summary
Class Attribute Details
.app_root (rw)
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 8
class_attribute :app_root
.app_root? ⇒ Boolean
(rw)
[ GitHub ]
# File 'railties/lib/rails/test_unit/reporter.rb', line 8
class_attribute :app_root
.executable (rw)
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 9
class_attribute :executable, default: "bin/rails test"
.executable? ⇒ Boolean
(rw)
[ GitHub ]
# File 'railties/lib/rails/test_unit/reporter.rb', line 9
class_attribute :executable, default: "bin/rails test"
Instance Attribute Details
#app_root= (rw)
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 8
class_attribute :app_root
#app_root? ⇒ Boolean
(rw)
[ GitHub ]
# File 'railties/lib/rails/test_unit/reporter.rb', line 8
class_attribute :app_root
#executable (rw)
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 9
class_attribute :executable, default: "bin/rails test"
#executable? ⇒ Boolean
(rw)
[ GitHub ]
# File 'railties/lib/rails/test_unit/reporter.rb', line 9
class_attribute :executable, default: "bin/rails test"
Instance Method Details
#filtered_results
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 46
def filtered_results if [:verbose] results else results.reject(&:skipped?) end end
#record(result)
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 11
def record(result) super if [: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? || [: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
#relative_path_for(file)
[ GitHub ]#report
[ GitHub ]# File 'railties/lib/rails/test_unit/reporter.rb', line 34
def report return if output_inline? || filtered_results.empty? io.puts io.puts "Failed tests:" io.puts io.puts aggregated_results end