github.com/petergtz/pegomock@v2.9.1-0.20230424204322-eb0e044013df+incompatible/modelgen/gomock/reflect_test.go (about)

     1  package gomock_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/onsi/ginkgo"
     7  	. "github.com/onsi/ginkgo"
     8  	"github.com/onsi/gomega"
     9  	. "github.com/onsi/gomega"
    10  	"github.com/petergtz/pegomock/modelgen/gomock"
    11  )
    12  
    13  func TestGomock(t *testing.T) {
    14  	gomega.RegisterFailHandler(ginkgo.Fail)
    15  	ginkgo.RunSpecs(t, "gomock Suite")
    16  }
    17  
    18  var _ = Describe("reflect", func() {
    19  	It("can generate mocks for interfaces taken from vendored packages", func() {
    20  		_, e := gomock.Reflect("github.com/petergtz/vendored_package", []string{"Interface"})
    21  		Expect(e).NotTo(HaveOccurred())
    22  	})
    23  })