Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Test::Unit::UI::TestRunnerMediator

Provides an interface to write any given UI against, hopefully making it easy to write new UIs.

Constants

FINISHED
RESET
STARTED

Public Class Methods

new(suite) click to toggle source

Creates a new TestRunnerMediator initialized to run the passed suite.

# File lib/test/unit/ui/testrunnermediator.rb, line 26
def initialize(suite)
  @suite = suite
end

Public Instance Methods

run() click to toggle source

Runs the suite the TestRunnerMediator was created with.

# File lib/test/unit/ui/testrunnermediator.rb, line 32
def run
  AutoRunner.need_auto_run = false

  result = create_result

  start_time = Time.now
  begin
    with_listener(result) do
      notify_listeners(RESET, @suite.size)
      notify_listeners(STARTED, result)

      run_suite(result)
    end
  ensure
    elapsed_time = Time.now - start_time
    notify_listeners(FINISHED, elapsed_time)
  end

  result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.