예제 #1
0
파일: panics.go 프로젝트: redforks/testing
// PanicsWithSubstring returns a gomega matcher, like Panics() but matches substring of err.Error().
func PanicsWithSubstring(substr string) types.GomegaMatcher {
	return &panicsWithSubstring{
		substr: substr,
		panics: panics{err: gomega.WithTransform(func(v interface{}) string {
			return fmt.Sprint(v)
		}, gomega.ContainSubstring(substr)),
		},
	}
}
예제 #2
0
func MatchErrorResponse(errRespToMatch *awsfaker.ErrorResponse) types.GomegaMatcher {
	return gomega.WithTransform(requestFailure_to_errorResponse, gomega.Equal(errRespToMatch))
}