class Test::Unit::UI::TestRunner

Attributes

listeners[R]

Public Class Methods

new(suite, options={}) click to toggle source
# File test-unit-3.3.4/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

Public Instance Methods

start() click to toggle source

Begins the test run.

# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 21
def start
  setup_mediator
  attach_to_mediator
  attach_listeners
  start_mediator
end

Private Instance Methods

attach_listeners() click to toggle source
# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 33
def attach_listeners
  @listeners.each do |listener|
    listener.attach_to_mediator(@mediator)
  end
end
diff_target_string?(string) click to toggle source
# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 43
def diff_target_string?(string)
  Assertions::AssertionMessage.diff_target_string?(string)
end
prepare_for_diff(from, to) click to toggle source
# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 47
def prepare_for_diff(from, to)
  Assertions::AssertionMessage.prepare_for_diff(from, to)
end
setup_mediator() click to toggle source
# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 29
def setup_mediator
  @mediator = TestRunnerMediator.new(@suite)
end
start_mediator() click to toggle source
# File test-unit-3.3.4/lib/test/unit/ui/testrunner.rb, line 39
def start_mediator
  @mediator.run
end