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

Class | Test::Unit::UI::GTK2::TestRunner
In: | test/unit/ui/gtk2/testrunner.rb
Parent: | Object

### Methods

new progress_panel run_button start test_finished

### Public Class methods

new(suite, output_level = NORMAL)

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 441
              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()

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 235
              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()

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 243
              def run_button
                lazy_initialize(:run_button) do
                  @run_button = Gtk::Button.new("Run")
                end
              end

start()

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 433
              def start
                setup_mediator
                setup_ui
                attach_to_mediator
                start_ui
                @result
              end

test_finished(result)

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 328
              def test_finished(result)
                test_progress_bar.fraction += 1.0 / @count
              end

[Validate]