Class: RUNIT::CUI::TestRunner

Inherits:
Test::Unit::UI::Console::TestRunner
  • Object
show all
Defined in:
lib/runit/cui/testrunner.rb

Constant Summary collapse

@@quiet_mode =
false

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTestRunner

Returns a new instance of TestRunner.



17
18
19
# File 'lib/runit/cui/testrunner.rb', line 17

def initialize
  super nil
end

Class Method Details

.quiet_mode=(boolean) ⇒ Object



46
47
48
# File 'lib/runit/cui/testrunner.rb', line 46

def self.quiet_mode=(boolean)
  @@quiet_mode = boolean
end

.run(suite) ⇒ Object



13
14
15
# File 'lib/runit/cui/testrunner.rb', line 13

def self.run(suite)
  self.new().run(suite)
end

.suiteObject



23
24
25
# File 'lib/runit/cui/testrunner.rb', line 23

def @suite.suite
  self
end

Instance Method Details

#create_mediator(suite) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/runit/cui/testrunner.rb', line 30

def create_mediator(suite)
  mediator = Test::Unit::UI::TestRunnerMediator.new(suite)
  class << mediator
    attr_writer :result_delegate
    def create_result
      return @result_delegate.create_result
    end
  end
  mediator.result_delegate = self
  return mediator
end

#create_resultObject



42
43
44
# File 'lib/runit/cui/testrunner.rb', line 42

def create_result
  return RUNIT::TestResult.new
end

#run(suite, quiet_mode = @@quiet_mode) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/runit/cui/testrunner.rb', line 21

def run(suite, quiet_mode=@@quiet_mode)
  @suite = suite
  def @suite.suite
    self
  end
  @output_level = (quiet_mode ? Test::Unit::UI::PROGRESS_ONLY : Test::Unit::UI::VERBOSE)
  start
end