16 lines
325 B
Go
16 lines
325 B
Go
|
|
package internal
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"strings"
|
||
|
|
|
||
|
|
"gopkg.in/h2non/gock.v1"
|
||
|
|
)
|
||
|
|
|
||
|
|
func PrintPendingMocks(mocks []gock.Mock) string {
|
||
|
|
paths := []string{}
|
||
|
|
for _, mock := range mocks {
|
||
|
|
paths = append(paths, mock.Request().URLStruct.String())
|
||
|
|
}
|
||
|
|
return fmt.Sprintf("%d unmatched mocks: %s", len(paths), strings.Join(paths, ", "))
|
||
|
|
}
|