Sha256: eb2db4d656ad9b1c26b386fabd7a56ee24a4c1ee6f00c2a8a7ad0d60e0d2cd81

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

#--
#
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.

module Test
  module Unit
    module UI

      SILENT = 0
      PROGRESS_ONLY = 1
      NORMAL = 2
      VERBOSE = 3

      # Provides some utilities common to most, if not all,
      # TestRunners.
      #
      #--
      #
      # Perhaps there ought to be a TestRunner superclass? There
      # seems to be a decent amount of shared code between test
      # runners.

      module TestRunnerUtilities

        # Creates a new TestRunner and runs the suite.
        def run(suite, output_level=NORMAL)
          return new(suite, output_level).start
        end

        # Takes care of the ARGV parsing and suite
        # determination necessary for running one of the
        # TestRunners from the command line.
        def start_command_line_test
          if ARGV.empty?
            puts "You should supply the name of a test suite file to the runner"
            exit
          end
          require ARGV[0].gsub(/.+::/, '')
          new(eval(ARGV[0])).start
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
rubysl-test-unit-1.0.1 lib/test/unit/ui/testrunnerutilities.rb
rubysl-test-unit-1.0.0 lib/test/unit/ui/testrunnerutilities.rb
ruby_on_ruby-0.0.1 vendor/javascripts/emscripted-ruby/lib/test/unit/ui/testrunnerutilities.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/test-unit-1.2.3/lib/test/unit/ui/testrunnerutilities.rb
test-unit-1.2.3 lib/test/unit/ui/testrunnerutilities.rb