In: |
test/unit/ui/fox/testrunner.rb
|
Parent: | Object |
Runs a Test::Unit::TestSuite in a Fox UI. Obviously, this one requires you to have Fox (www.fox-toolkit.org/fox.html) and the Ruby Fox extension (fxruby.sourceforge.net/) installed.
RED_STYLE | = | FXRGBA(0xFF,0,0,0xFF) |
GREEN_STYLE | = | FXRGBA(0,0xFF,0,0xFF) |
Creates a new TestRunner and runs the suite.
# File test/unit/ui/fox/testrunner.rb, line 31 def self.run(suite) new(suite).start end
Creates a new TestRunner for running the passed suite.
# File test/unit/ui/fox/testrunner.rb, line 37 def initialize(suite, output_level = NORMAL) if (suite.respond_to?(:suite)) @suite = suite.suite else @suite = suite end @result = nil @red = false end
Begins the test run.
# File test/unit/ui/fox/testrunner.rb, line 49 def start setup_ui setup_mediator attach_to_mediator start_ui @result end
# File test/unit/ui/fox/testrunner.rb, line 141 def test_started(test_name) output_status("Running #{test_name}...") end
# File test/unit/ui/fox/testrunner.rb, line 145 def finished(elapsed_time) output_status("Finished in #{elapsed_time} seconds") end
# File test/unit/ui/fox/testrunner.rb, line 149 def output_status(string) @status_entry.text = string @status_entry.repaint end
# File test/unit/ui/fox/testrunner.rb, line 194 def create_window(app) FXMainWindow.new(app, "Test::Unit TestRunner", nil, nil, DECOR_ALL, 0, 0, 450) end