Пример #1
0
func (reporter *ForwardingReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) {
	output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput()
	reporter.outputInterceptor.StartInterceptingOutput()
	setupSummary.CapturedOutput = output
	reporter.post("/AfterSuiteDidRun", setupSummary)
}
Пример #2
0
import (
	"encoding/json"
	. "github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo"
	"github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo/config"
	. "github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote"
	"github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo/types"
	. "github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/gomega"
)

var _ = Describe("ForwardingReporter", func() {
	var (
		reporter     *ForwardingReporter
		interceptor  *fakeOutputInterceptor
		poster       *fakePoster
		suiteSummary *types.SuiteSummary
		specSummary  *types.SpecSummary
		setupSummary *types.SetupSummary
		serverHost   string
	)

	BeforeEach(func() {
		serverHost = "http://127.0.0.1:7788"

		poster = newFakePoster()

		interceptor = &fakeOutputInterceptor{
			InterceptedOutput: "The intercepted output!",
		}

		reporter = NewForwardingReporter(serverHost, poster, interceptor)