Class: Test::Unit::UI::Console::TestRunner

Inherits:
TestRunner
  • Object
show all
Includes:
OutputLevel
Defined in:
lib/test/unit/ui/console/testrunner.rb

Overview

Runs a Test::Unit::TestSuite on the console.

Direct Known Subclasses

Emacs::TestRunner

Constant Summary

Constants included from OutputLevel

OutputLevel::NORMAL, OutputLevel::PROGRESS_ONLY, OutputLevel::SILENT, OutputLevel::VERBOSE

Instance Attribute Summary

Attributes inherited from TestRunner

#listeners

Instance Method Summary collapse

Methods inherited from TestRunner

#start

Methods included from TestRunnerUtilities

#run, #start_command_line_test

Constructor Details

#initialize(suite, options = {}) ⇒ TestRunner

Creates a new TestRunner for running the passed suite. If quiet_mode is true, the output while running is limited to progress dots, errors and failures, and the final result. io specifies where runner output should go to; defaults to STDOUT.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/test/unit/ui/console/testrunner.rb', line 29

def initialize(suite, options={})
  super
  @output_level = @options[:output_level] || NORMAL
  @output = @options[:output] || STDOUT
  @use_color = @options[:use_color]
  @use_color = guess_color_availability if @use_color.nil?
  @color_scheme = @options[:color_scheme] || ColorScheme.default
  @reset_color = Color.new("reset")
  @progress_row = 0
  @progress_row_max = @options[:progress_row_max]
  @progress_row_max ||= guess_progress_row_max
  @already_outputted = false
  @indent = 0
  @top_level = true
  @faults = []
end