Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 513 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 513 Bytes

testify-matchers

A set of argumentMatchers for testify's mock package

To be used in conjunction with testify: http://github.com/stretchr/testify

Usage

package main

import (
    matcher "github.com/henryleduc/testify-matchers"
    "github.com/stretchr/testify/mock"
    "time"
)

func main() {
    // TimeWithGracePeriod matcher
    mock.MatchedBy(matcher.TimeWithGracePeriod(10 * time.Second))
    
    // ContextWithValue matcher
    mock.MatchedBy(matcher.ContextWithValue("myBool", true))
}