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

Inherits:
TestRunner
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/test/unit/ui/xml/testrunner.rb

Overview

Runs a Test::Unit::TestSuite and outputs XML.

Instance Attribute Summary

Attributes inherited from TestRunner

#listeners

Instance Method Summary collapse

Methods inherited from TestRunner

#start

Methods included from TestRunnerUtilities

#run, #start_command_line_test

Constructor Details

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

Creates a new TestRunner for running the passed suite. :output option specifies where runner output should go to; defaults to STDOUT.



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

def initialize(suite, options={})
  super
  @output = @options[:output] || STDOUT
  if @options[:output_file_descriptor]
    @output = IO.new(@options[:output_file_descriptor], "w")
  end
  @already_outputted = false
  @indent = 0
  @top_level = true
  @current_test = nil
  @current_test_suite = nil
  @already_outputted = false
end