Module: Test::Unit::UI::TestRunnerUtilities
- Included in:
- TestRunner
- Defined in:
- lib/test/unit/ui/testrunnerutilities.rb,
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.
17 18 19 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 17 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.
24 25 26 27 28 29 30 31 |
# File 'lib/test/unit/ui/testrunnerutilities.rb', line 24 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 |