TestTask when --verbose prompts for TESTOPTS="--verbose" #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CASE
Originally, Jim Weirich developed Rake to work with (arguably)
Test::Unit
, before the arrival ofMinitest
. And none of the following gems:Cucumber
RSpec
Test::Unit
(used for testing) prompts the user to rerun their tests with a
--verbose
command line option.Minitest
(somewhat newer) does so prompt the user—it (sometimes) emits the message: "You have skipped tests. Run with--verbose
for details." Under Rake, this message is somewhat confusing. This has been reported (see below).Rake's own test suite employs
Minitest
. When tests are skipped (as onWindows
), it also displays this problem (i.e.,Minitest
emits the above, confusing message).In a Rails issue, Adding --verbose flag to rake test doesn't do anything (closed), @cannikin says:
In an (earlier) article, Rails Tip: Running Tests with Verbose Output, @peter says:
Overall, it would seem good to improve the ease (for new users) of using Rake's
TestTask
.PLAN
In @shunsuke227ono's
Minitest
pull request, add summary message for case that minitest is used from rake task (closed), @zenspider commented:It seems possible (though elaborately difficult) for Rake to detect Minitest (despite its being run in a forked shell command).
But to avoid all that (major) trouble, simply instead supplying a printed reminder to use
TESTOPTS="--verbose"
would seem able to clarify this (for new users), as well as to resolve this misleading information apparently printed by a Rake test task.To minimize output, this should be printed only when running a Rake
TestTask
in--verbose
mode (e.g., when the user already has tried the apparent,Minitest
-recommended solution of adding--verbose
).This supplies the printed reminder (and adds tests). It ameliorates the issue of pull request #67 (which effectively was reverted).