Module: Test::Unit::UI::TestRunnerUtilities
- Included in:
- Console::TestRunner, Fox::TestRunner, GTK2::TestRunner, GTK::TestRunner, Test::Unit::UI::Tk::TestRunner
- Defined in:
- lib/test/unit/ui/testrunnerutilities.rb
Overview
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.
Instance Method Summary collapse
-
#run(suite, output_level = NORMAL) ⇒ Object
Creates a new TestRunner and runs the suite.
-
#start_command_line_test ⇒ Object
Takes care of the ARGV parsing and suite determination necessary for running one of the TestRunners from the command line.
Instance Method Details
#run(suite, output_level = NORMAL) ⇒ Object
Creates a new TestRunner and runs the suite.
28 29 30 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 28 def run(suite, output_level=NORMAL) return new(suite, output_level).start end |
#start_command_line_test ⇒ Object
Takes care of the ARGV parsing and suite determination necessary for running one of the TestRunners from the command line.
35 36 37 38 39 40 41 42 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 35 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 |