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

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

Direct Known Subclasses

Console::TestRunner, XML::TestRunner

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TestRunnerUtilities

run, start_command_line_test

Constructor Details

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

Returns a new instance of TestRunner



10
11
12
13
14
15
16
17
18
# File 'lib/test/unit/ui/testrunner.rb', line 10

def initialize(suite, options={})
  if suite.respond_to?(:suite)
    @suite = suite.suite
  else
    @suite = suite
  end
  @options = options
  @listeners = @options[:listeners] || []
end

Instance Attribute Details

#listenersObject (readonly)

Returns the value of attribute listeners



9
10
11
# File 'lib/test/unit/ui/testrunner.rb', line 9

def listeners
  @listeners
end

Instance Method Details

#startObject

Begins the test run.



21
22
23
24
25
26
# File 'lib/test/unit/ui/testrunner.rb', line 21

def start
  setup_mediator
  attach_to_mediator
  attach_listeners
  start_mediator
end