test_.
test_ using reflection) in
the test case, and provide the appropriate feedback.
# File: ts_allTheTests.rb require 'test/unit' require 'testOne' require 'testTwo' require 'testThree'In this way, related test cases can be naturally grouped.
The author of Test/Unit, Nathaniel Talbott, suggests starting the
names of test cases with tc_ and the names of test suites with ts_
>> ruby -w tc_simpleNumber2.rb --name test_typecheck Loaded suite tc_simpleNumber2 Started . Finished in 0.003401 seconds. 1 tests, 1 assertions, 0 failures, 0 errors
It is also possible to run all tests whose names match a given pattern:
>> ruby -w tc_simpleNumber2.rb --name /test_type.*/ Loaded suite tc_simpleNumber2 Started . Finished in 0.003401 seconds. 1 tests, 1 assertions, 0 failures, 0 errors
unittestingpoint/examples(master)]$ ruby -I. tc_point_1.rb --help
Usage: tc_point_1 [options]
minitest options:
-h, --help Display this help.
-s, --seed SEED Sets random seed
-v, --verbose Verbose. Show progress processing files.
-n, --name PATTERN Filter test names on pattern.
--jobs-status [TYPE] Show status of jobs every file; Disabled when --jobs isn't specified.
-j, --jobs N Allow run tests with N jobs at once
--separate Restart job process after one testcase has done
--retry Retry running testcase when --jobs specified
--no-retry Disable --retry
--ruby VAL Path to ruby; It'll have used at -j option
-q, --hide-skip Hide skipped tests
--show-skip Show skipped tests
--color[=WHEN] colorize the output. WHEN defaults to 'always'
or can be 'never' or 'auto'.
--tty[=WHEN] force to output tty control. WHEN defaults to 'yes'
or can be 'no'.
-b, --basedir=DIR Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path
--[no-]gc-stress Set GC.stress as true
Casiano Rodriguez León 2015-01-07