Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can minitest do something like "rspec --color --format doc"?

I want a pretty-printed summary of what tests are running, similar to

rspec --color --format doc

Can minitest do that?

like image 628
Seamus Abshere Avatar asked Oct 31 '11 20:10

Seamus Abshere


2 Answers

"How to color unit tests with lib minitest or Test:Unit? is a similar question. Several options are provided there:

  • pride
  • turn
  • purdytest

  • minitest-reporters

like image 179
Dty Avatar answered Nov 13 '22 03:11

Dty


I've tried pride, Turn, Purdytest, and RedGreen. Among those, Turn's format is closest to rSpec.

However, I recommend MiniTestReporters over any of them. It offers several nice formats out of the gate, including an rSpec-ish one customized for viewing in TextMate (it intelligently handles ANSI color codes, for instance) and one that is similar to Turn/rSpec. MR's ProgressReporter format is especially nice for slow test suites, since it dynamically updates tests' status and total time remaining, instead of making you wait. MR also makes it easy to create a custom format.

If none of those suit, another option is MiniTest Colorize.

like image 38
cczona Avatar answered Nov 13 '22 04:11

cczona