Ejemplo n.º 1
0
func (runner *SpecRunner) reportSpecWillRun(spec *spec.Spec) {
	runner.writer.Truncate()

	summary := spec.Summary(runner.suiteID)
	for _, reporter := range runner.reporters {
		reporter.SpecWillRun(summary)
	}
}
Ejemplo n.º 2
0
func (runner *SpecRunner) reportSpecDidComplete(spec *spec.Spec) {
	summary := spec.Summary(runner.suiteID)
	for i := len(runner.reporters) - 1; i >= 1; i-- {
		runner.reporters[i].SpecDidComplete(summary)
	}

	if spec.Failed() {
		runner.writer.DumpOut()
	}

	runner.reporters[0].SpecDidComplete(summary)
}