use a gomock congestion in tests

This commit is contained in:
Marten Seemann
2017-11-25 11:08:40 -08:00
parent af4c7c2faf
commit f8e5a13c7d
8 changed files with 227 additions and 100 deletions

View File

@@ -1,6 +1,7 @@
package ackhandler
import (
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -11,3 +12,13 @@ func TestCrypto(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "AckHandler Suite")
}
var mockCtrl *gomock.Controller
var _ = BeforeEach(func() {
mockCtrl = gomock.NewController(GinkgoT())
})
var _ = AfterEach(func() {
mockCtrl.Finish()
})