Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • test/unit/ui/tk/testrunner.rb

Parent

Methods

Test::Unit::UI::Tk::TestRunner

Runs a Test::Unit::TestSuite in a Tk UI. Obviously, this one requires you to have Tk and the Ruby Tk extension installed.

Public Class Methods

new(suite, output_level = NORMAL) click to toggle source

Creates a new TestRunner for running the passed suite.

 
               # File test/unit/ui/tk/testrunner.rb, line 26
def initialize(suite, output_level = NORMAL)
  if (suite.respond_to?(:suite))
    @suite = suite.suite
  else
    @suite = suite
  end
  @result = nil

  @red = false
  @fault_detail_list = []
  @runner = Thread.current
  @restart_signal = Class.new(Exception)
  @viewer = Thread.start do
    @runner.join rescue @runner.run
    ::Tk.mainloop
  end
  @viewer.join rescue nil # wait deadlock to handshake
end
            

Public Instance Methods

start() click to toggle source

Begins the test run.

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

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

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 bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus