Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • test/unit.rb

Parent

Test::Unit::AutoRunner

Attributes

options[RW]
to_run[RW]

Public Class Methods

new(force_standalone = false, default_dir = nil, argv = ARGV) click to toggle source
 
               # File test/unit.rb, line 611
def initialize(force_standalone = false, default_dir = nil, argv = ARGV)
  @runner = Runner.new do |files, options|
    options[:base_directory] ||= default_dir
    files << default_dir if files.empty? and default_dir
    @to_run = files
    yield self if block_given?
    files
  end
  Runner.runner = @runner
  @options = @runner.option_parser
  @argv = argv
end
            
run(*args) click to toggle source
 
               # File test/unit.rb, line 633
def self.run(*args)
  new(*args).run
end
            

Public Instance Methods

process_args(*args) click to toggle source
 
               # File test/unit.rb, line 624
def process_args(*args)
  @runner.process_args(*args)
  !@to_run.empty?
end
            
run() click to toggle source
 
               # File test/unit.rb, line 629
def run
  @runner.run(@argv) || true
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.