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
438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 438 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
232 233 234 235 236 237 238 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 232 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
240 241 242 243 244 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 240 def lazy_initialize(:run_button) do @run_button = Gtk::Button.new("Run") end end |
#start ⇒ Object
430 431 432 433 434 435 436 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 430 def start setup_mediator setup_ui attach_to_mediator start_ui @result end |
#test_finished(result) ⇒ Object
325 326 327 |
# File 'lib/test/unit/ui/gtk2/testrunner.rb', line 325 def test_finished(result) .fraction += 1.0 / @count end |