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

Inherits:
Object
  • Object
show all
Extended by:
TestRunnerUtilities
Defined in:
lib/test/unit/ui/console/testrunner.rb

Overview

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

Instance Method Summary collapse

Methods included from TestRunnerUtilities

run, start_command_line_test

Constructor Details

#initialize(suite, output_level = NORMAL, io = STDOUT) ⇒ 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.



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/test/unit/ui/console/testrunner.rb', line 25

def initialize(suite, output_level=NORMAL, io=STDOUT)
  if (suite.respond_to?(:suite))
    @suite = suite.suite
  else
    @suite = suite
  end
  @output_level = output_level
  @io = io
  @already_outputted = false
  @faults = []
end

Instance Method Details

#startObject

Begins the test run.



38
39
40
41
42
# File 'lib/test/unit/ui/console/testrunner.rb', line 38

def start
  setup_mediator
  attach_to_mediator
  return start_mediator
end