Test::Unit::UI::GTK2::TestRunner (Class)

In: test/unit/ui/gtk2/testrunner.rb
Parent: Object

Methods

Public Class methods

[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

[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

[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

[Source]

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

[Source]

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

[Validate]