Runs a Test::Unit::TestSuite in a Gtk UI. Obviously, this one requires you to have Gtk (www.gtk.org/) and the Ruby Gtk extension (ruby-gnome.sourceforge.net/) installed.
Creates a new TestRunner for running the passed suite.
# File test/unit/ui/gtk/testrunner.rb, line 25
def initialize(suite, output_level = NORMAL)
if (suite.respond_to?(:suite))
@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
Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.
If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.