richcarl/eunit — pull request #7 by seth (2011-12-09 04:24:25+00:00)
Title: Allow users to customize the default listener

Hi,

I was experimenting with a report listener that can print colorized output to the terminal in a style modeled after rspec. In order to do that and not have eunit_tty run, I had to create my own copy of eunit to setup listeners and initiate the run. So here's a patch that allows the default report listener to be customized.

Users can specify a custom default listener by adding a tuple like the
following to the Options list passed to test/2:

{default_report, {Mod, ModOpts}}

If present, Mod:start(ModOpts) will be called and this listener will
be installed. If a default_report key is not provided in the options
list, eunit_tty is enabled; the default behavior does not
change.