コード例 #1
0
func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types.SpecSummary) {
	output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput()
	reporter.outputInterceptor.StartInterceptingOutput()
	specSummary.CapturedOutput = output
	reporter.post("/SpecDidComplete", specSummary)
}
コード例 #2
0
	"time"

	. "github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo"
	"github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/config"
	"github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/reporters"
	st "github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/reporters/stenographer"
	"github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/types"
	. "github.com/duskhacker/cqrsnu/internal/github.com/onsi/gomega"
)

var _ = Describe("DefaultReporter", func() {
	var (
		reporter       *reporters.DefaultReporter
		reporterConfig config.DefaultReporterConfigType
		stenographer   *st.FakeStenographer

		ginkgoConfig config.GinkgoConfigType
		suite        *types.SuiteSummary
		spec         *types.SpecSummary
	)

	BeforeEach(func() {
		stenographer = st.NewFakeStenographer()
		reporterConfig = config.DefaultReporterConfigType{
			NoColor:           false,
			SlowSpecThreshold: 0.1,
			NoisyPendings:     false,
			Verbose:           true,
			FullTrace:         true,
		}
コード例 #3
0
import (
	"encoding/json"

	. "github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo"
	"github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/config"
	. "github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/internal/remote"
	"github.com/duskhacker/cqrsnu/internal/github.com/onsi/ginkgo/types"
	. "github.com/duskhacker/cqrsnu/internal/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)