Xcribe v0.7.7 Xcribe.Formatter View Source

An implementation of ExUnit Formatter.

This module is a GenServer that receives ExUnits events from your test suite. It handle the suite_finished event and then generates the documentation from the collected requests.

You must add Xcribe.Formatter in the list of formatters in your test_helper.exs.

ExUnit.start(formatters: [ExUnit.CLIFormatter, Xcribe.Formatter])

You must keep ExUnit.CLIFormatter in the list as well.

The document will be generated if the pre-configured env var has a truthy value. Other wise the Formatter will ignore the finished event.

All request documented with macro document/2 (See Xcribe) will be parsed by Xcribe. When the test suite finish Xcribe.Formatter will check if all colleted requests are valid. If some invalid request is found an error output will apears and documentation will not be generated.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.