コード例 #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
ファイル: match_aws_error.go プロジェクト: rosenhouse/tubes
func MatchErrorResponse(errRespToMatch *awsfaker.ErrorResponse) types.GomegaMatcher {
	return gomega.WithTransform(requestFailure_to_errorResponse, gomega.Equal(errRespToMatch))
}