Class: Test::Unit::UI::GTK2::TestRunner
- Inherits:
-
UI::TestRunner
- Object
- UI::TestRunner
- Test::Unit::UI::GTK2::TestRunner
- Defined in:
- lib/test/unit/ui/gtk2/testrunner.rb
Instance Method Summary collapse
-
#initialize(suite, options = {}) ⇒ TestRunner
constructor
def start.
- #progress_panel ⇒ Object
-
#run_button ⇒ Object
def progress_panel.
- #start ⇒ Object
- #test_finished(result) ⇒ Object
Constructor Details
#initialize(suite, options = {}) ⇒ TestRunner
def start
441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 441 def initialize(suite, ={}) super @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 |
Instance Method Details
#progress_panel ⇒ Object
235 236 237 238 239 240 241 |
# File 'lib/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(, true, true, 0) end end |
#run_button ⇒ Object
def progress_panel
243 244 245 246 247 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 243 def lazy_initialize(:run_button) do @run_button = Gtk::Button.new("Run") end end |
#start ⇒ Object
433 434 435 436 437 438 439 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 433 def start setup_mediator setup_ui attach_to_mediator start_ui @result end |
#test_finished(result) ⇒ Object
328 329 330 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 328 def test_finished(result) .fraction += 1.0 / @count end |