Skip to content

Commit

Permalink
remove noisySkippings
Browse files Browse the repository at this point in the history
  • Loading branch information
onsi committed Jun 21, 2015
1 parent 0c8d509 commit d981d36
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## HEAD

Improvements:

- `Skip(message)` can be used to skip the current test.

Bug Fixes:

- Ginkgo tests now fail when you `panic(nil)` (#167)
Expand Down
6 changes: 0 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type DefaultReporterConfigType struct {
NoColor bool
SlowSpecThreshold float64
NoisyPendings bool
NoisySkippings bool
Succinct bool
Verbose bool
FullTrace bool
Expand Down Expand Up @@ -82,7 +81,6 @@ func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) {
flagSet.BoolVar(&(DefaultReporterConfig.NoColor), prefix+"noColor", false, "If set, suppress color output in default reporter.")
flagSet.Float64Var(&(DefaultReporterConfig.SlowSpecThreshold), prefix+"slowSpecThreshold", 5.0, "(in seconds) Specs that take longer to run than this threshold are flagged as slow by the default reporter (default: 5 seconds).")
flagSet.BoolVar(&(DefaultReporterConfig.NoisyPendings), prefix+"noisyPendings", true, "If set, default reporter will shout about pending tests.")
flagSet.BoolVar(&(DefaultReporterConfig.NoisySkippings), prefix+"noisySkippings", true, "If set, default reporter will shout about skipping tests.")
flagSet.BoolVar(&(DefaultReporterConfig.Verbose), prefix+"v", false, "If set, default reporter print out all specs as they begin.")
flagSet.BoolVar(&(DefaultReporterConfig.Succinct), prefix+"succinct", false, "If set, default reporter prints out a very succinct report")
flagSet.BoolVar(&(DefaultReporterConfig.FullTrace), prefix+"trace", false, "If set, default reporter prints out the full stack trace when a failure occurs")
Expand Down Expand Up @@ -156,10 +154,6 @@ func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultRepor
result = append(result, fmt.Sprintf("--%snoisyPendings=false", prefix))
}

if !reporter.NoisySkippings {
result = append(result, fmt.Sprintf("--%snoisySkippings=false", prefix))
}

if reporter.Verbose {
result = append(result, fmt.Sprintf("--%sv", prefix))
}
Expand Down
2 changes: 1 addition & 1 deletion ginkgo_dsl.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func buildDefaultReporter() Reporter {
}
}

//Skip notifies Ginkgo that the current spec was skipped.
//Skip notifies Ginkgo that the current spec should be skipped.
func Skip(message string, callerSkip ...int) {
skip := 0
if len(callerSkip) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/remote/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (aggregator *Aggregator) announceSpec(specSummary *types.SpecSummary) {
case types.SpecStatePending:
aggregator.stenographer.AnnouncePendingSpec(specSummary, aggregator.config.NoisyPendings && !aggregator.config.Succinct)
case types.SpecStateSkipped:
aggregator.stenographer.AnnounceSkippedSpec(specSummary, aggregator.config.Succinct && !aggregator.config.NoisySkippings, aggregator.config.FullTrace)
aggregator.stenographer.AnnounceSkippedSpec(specSummary, aggregator.config.Succinct, aggregator.config.FullTrace)
case types.SpecStateTimedOut:
aggregator.stenographer.AnnounceSpecTimedOut(specSummary, aggregator.config.Succinct, aggregator.config.FullTrace)
case types.SpecStatePanicked:
Expand Down
2 changes: 1 addition & 1 deletion reporters/default_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.SpecSummary)
case types.SpecStatePending:
reporter.stenographer.AnnouncePendingSpec(specSummary, reporter.config.NoisyPendings && !reporter.config.Succinct)
case types.SpecStateSkipped:
reporter.stenographer.AnnounceSkippedSpec(specSummary, reporter.config.Succinct && !reporter.config.NoisySkippings, reporter.config.FullTrace)
reporter.stenographer.AnnounceSkippedSpec(specSummary, reporter.config.Succinct, reporter.config.FullTrace)
case types.SpecStateTimedOut:
reporter.stenographer.AnnounceSpecTimedOut(specSummary, reporter.config.Succinct, reporter.config.FullTrace)
case types.SpecStatePanicked:
Expand Down
19 changes: 0 additions & 19 deletions reporters/default_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ var _ = Describe("DefaultReporter", func() {
NoColor: false,
SlowSpecThreshold: 0.1,
NoisyPendings: false,
NoisySkippings: false,
Verbose: true,
FullTrace: true,
}
Expand Down Expand Up @@ -313,24 +312,6 @@ var _ = Describe("DefaultReporter", func() {
})
})

Context("in noisy skippings mode", func() {
BeforeEach(func() {
reporterConfig.Succinct = false
reporterConfig.NoisySkippings = true
reporter = reporters.NewDefaultReporter(reporterConfig, stenographer)
})

Context("When the spec is skipped", func() {
BeforeEach(func() {
spec.State = types.SpecStateSkipped
})

It("should announce the skipped spec, noisily", func() {
Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSkippedSpec", spec, false, true)))
})
})
})

Context("in succinct mode", func() {
BeforeEach(func() {
reporterConfig.Succinct = true
Expand Down

0 comments on commit d981d36

Please sign in to comment.