Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 897 Bytes

customising-output.md

File metadata and controls

29 lines (20 loc) · 897 Bytes

Customise Output

To customise the output of boon, you must implement the boon.printers.BoonPrinter trait:

trait BoonPrinter {
  def print(co: ColourOutput, out: String => Unit, so: SuiteOutput): Unit
}

Then supply your implementation (which must be an object) to boon via SBT with the -P flag and the full package path to the printer class:

testOnly *MyFirstSuite -- -P some.AwesomePrinter

where some.AwesomePrinter is:

package some

import boon.printers.BoonPrinter

object AwesomePrinter extends BoonPrinter {
  def print(co: ColourOutput, out: String => Unit, so: SuiteOutput): Unit = ...
}

See SimplePrinter and FlatPrinter for more details.