Module: Test::Unit::UI::TestRunnerUtilities
- Included in:
- 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, options = {}) ⇒ 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, options = {}) ⇒ Object
Creates a new TestRunner and runs the suite.
23 24 25 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 23 def run(suite, ={}) return new(suite, ).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.
30 31 32 33 34 35 36 37 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 30 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 |