예제 #1
0
import (
	. "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/reporters"
	st "github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/stenographer"
	"github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/ginkgo/types"
	. "github.com/jwaldrip/odin/Godeps/_workspace/src/github.com/onsi/gomega"
	"time"
)

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:     true,
			Verbose:           true,
			FullTrace:         true,
		}
예제 #2
0
func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types.SpecSummary) {
	output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput()
	reporter.outputInterceptor.StartInterceptingOutput()
	specSummary.CapturedOutput = output
	reporter.post("/SpecDidComplete", specSummary)
}
예제 #3
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)