...

Source file src/github.com/onsi/ginkgo/v2/integration/skip_test.go

Documentation: github.com/onsi/ginkgo/v2/integration

     1  package integration_test
     2  
     3  import (
     4  	. "github.com/onsi/ginkgo/v2"
     5  	. "github.com/onsi/gomega"
     6  	"github.com/onsi/gomega/gexec"
     7  )
     8  
     9  var _ = Describe("Skipping Specs", func() {
    10  	BeforeEach(func() {
    11  		fm.MountFixture("skip")
    12  	})
    13  
    14  	It("should skip in all the possible ways", func() {
    15  		session := startGinkgo(fm.PathTo("skip"), "--no-color", "-v")
    16  		Eventually(session).Should(gexec.Exit(0))
    17  		output := string(session.Out.Contents())
    18  
    19  		Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS"))
    20  
    21  		Ω(output).Should(ContainSubstring("a top level skip on line 9"))
    22  		Ω(output).Should(ContainSubstring("skip_fixture_test.go:9"))
    23  
    24  		Ω(output).Should(ContainSubstring("a sync SKIP"))
    25  
    26  		Ω(output).Should(ContainSubstring("S [SKIPPED] ["))
    27  		Ω(output).Should(ContainSubstring("a BeforeEach SKIP"))
    28  		Ω(output).Should(ContainSubstring("S [SKIPPED] ["))
    29  		Ω(output).Should(ContainSubstring("an AfterEach SKIP"))
    30  
    31  		Ω(output).Should(ContainSubstring("0 Passed | 0 Failed | 0 Pending | 4 Skipped"))
    32  	})
    33  })
    34  

View as plain text