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

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.

Constants

RED_STYLE = FXRGBA(0xFF,0,0,0xFF)
GREEN_STYLE = FXRGBA(0,0xFF,0,0xFF)

Public Class methods

Creates a new TestRunner and runs the suite.

[Source]

# 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.

[Source]

# 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

Public Instance methods

Begins the test run.

[Source]

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

[Source]

# File test/unit/ui/fox/testrunner.rb, line 141
          def test_started(test_name)
            output_status("Running #{test_name}...")
          end

[Source]

# File test/unit/ui/fox/testrunner.rb, line 145
          def finished(elapsed_time)
            output_status("Finished in #{elapsed_time} seconds")
          end

[Source]

# File test/unit/ui/fox/testrunner.rb, line 149
          def output_status(string)
            @status_entry.text = string
            @status_entry.repaint
          end

[Source]

# 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

[Source]

# File test/unit/ui/fox/testrunner.rb, line 198
          def create_tooltip(app)
            FXTooltip.new(app)
          end

[Source]

# File test/unit/ui/fox/testrunner.rb, line 224
          def create_label(parent, text)
            FXLabel.new(parent, text, nil, JUSTIFY_CENTER_X | LAYOUT_FILL_COLUMN)
          end

[Validate]