File: abort_fixture_suite_test.go

package info (click to toggle)
golang-github-onsi-ginkgo-v2 2.27.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,340 kB
  • sloc: javascript: 65; makefile: 23; sh: 14
file content (30 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package abort_fixture_test

import (
	"testing"
	"time"

	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
)

func TestAbortFixture(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "AbortFixture Suite")
}

var _ = Describe("top-level container", func() {
	It("runs and passes", func() {})
	It("aborts", func() {
		time.Sleep(time.Second)
		AbortSuite("this suite needs to end now!")
	})
	It("never runs", func() {
		time.Sleep(time.Hour)
		Fail("SHOULD NOT SEE THIS")
	})
	It("never runs either", func() {
		time.Sleep(time.Hour)
		Fail("SHOULD NOT SEE THIS")
	})
})