5 "github.com/onsi/gomega/format"
8 type BeTrueMatcher struct {
11 func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) {
13 return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
16 return actual.(bool), nil
19 func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) {
20 return format.Message(actual, "to be true")
23 func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
24 return format.Message(actual, "not to be true")