Pass test suite instance to #start_suite

This commit is contained in:
Michael Miller 2019-02-12 12:58:54 -07:00
parent 56c5d7c888
commit 5af9799df0
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ module Spectator::Formatters
ERROR_CHAR = 'E'.colorize(ERROR_COLOR)
PENDING_CHAR = '*'.colorize(PENDING_COLOR)
def start_suite
def start_suite(suite : TestSuite)
end
def end_suite(report : Report)

View File

@ -10,7 +10,7 @@ module Spectator::Formatters
# Steps 2 and 3 are called for each example in the suite.
abstract class Formatter
# Called when a test suite is starting to execute.
abstract def start_suite
abstract def start_suite(suite : TestSuite)
# Called when a test suite finishes.
# The results from the entire suite are provided.

View File

@ -11,7 +11,7 @@ module Spectator
# and invoke the formatter to output results.
def run : Nil
# Indicate the suite is starting.
@config.formatter.start_suite
@config.formatter.start_suite(@suite)
# Run all examples and capture the results.
results = [] of Result