In Files

  • test-unit-3.3.4/lib/test/unit/ui/console/testrunner.rb

Class/Module Index [+]

Quicksearch

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

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

Public Class Methods

new(suite, options={}) click to toggle source

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.

 
               # File test-unit-3.3.4/lib/test/unit/ui/console/testrunner.rb, line 37
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
  @show_detail_immediately = @options[:show_detail_immediately]
  @show_detail_immediately = true if @show_detail_immediately.nil?
  @reverse_output = @options[:reverse_output]
  @reverse_output = @output.tty? if @reverse_output.nil?
  @already_outputted = false
  @indent = 0
  @top_level = true
  @current_output_level = NORMAL
  @faults = []
  @code_snippet_fetcher = CodeSnippetFetcher.new
  @test_suites = []
end