gojuno / minimock

Powerful mock generation tool for Go programming language
MIT License
577 stars 38 forks source link

Add a Calls() method for call arg history #36

Closed Kangaroux closed 5 years ago

Kangaroux commented 5 years ago

This adds a Calls() method to the method mock object which returns a list of arguments the method was called with.

Kangaroux commented 5 years ago

I didn't include it as part of the PR but I did test the case where a method has no arguments. If you create a new interface with a no-arg method and generate a mock for it, you can verify that there is no reference to callArgs or a Calls() method

jesseroux commented 5 years ago

@hexdigest Pushed changes

hexdigest commented 5 years ago

Thanks @Kangaroux ! I'll tag it and release a new version soon.