Test::Pretty - Because TAP Is Unnattractive

tags: perl

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).