Test::Pretty - because TAP is unnattractive
Test::Pretty (artfully written by the inimitable @tokuhirom) makes my tests look like this:
This is especially nice when I have subtests.
How it works
I can enable Test::Pretty like this
prove -MTest::Pretty -vlr t
But typing extra characters is not fun. Happily @tokuhirom also created a prove plugin (which is included with the Test::Pretty module) which allows me to do this:
prove -Pretty -vlr t
Shorter but still too much typing so I created a ~/.proverc
file which contains
the following lines:
--lib
--verbose
--comments
--recurse
-Pretty
Now I can get pretty verbose recursive (etc) tests and I only need to type this
prove t
You can view my ~/.proverc
and more goodies in my dotfiles repo).
Nice! You read all the way to the bottom of this post. You might find my
book Minimum Viable Perl useful. It contains concise tutorials for
experienced developers. Its free, open source, and a work in progress.
Subscribe to get new
chapters in your inbox.