Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • test/unit/ui/gtk2/testrunner.rb

Test::Unit::UI::GTK2::TestRunner

Public Class Methods

new(suite, output_level = NORMAL) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 443
def initialize(suite, output_level = NORMAL)
  if suite.respond_to?(:suite) then
    @suite = suite.suite
  else
    @suite = suite
  end
  @result = nil

  @runner = Thread.current
  @restart_signal = Class.new(Exception)
  @viewer = Thread.start do
    @runner.join rescue @runner.run
    Gtk.main
  end
  @viewer.join rescue nil # wait deadlock to handshake
end
            

Public Instance Methods

progress_panel() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 237
def progress_panel
  lazy_initialize(:progress_panel) do
    @progress_panel = Gtk::HBox.new(false, 10)
    @progress_panel.border_width = 10
    @progress_panel.pack_start(test_progress_bar, true, true, 0)
  end
end
            
run_button() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 245
def run_button
  lazy_initialize(:run_button) do
    @run_button = Gtk::Button.new("Run")
  end
end
            
start() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 435
def start
  setup_mediator
  setup_ui
  attach_to_mediator
  start_ui
  @result
end
            
test_finished(result) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 330
def test_finished(result)
  test_progress_bar.fraction += 1.0 / @count
end