agiledragon / gomonkey

gomonkey is a library to make monkey patching in unit tests easy
MIT License
1.92k stars 178 forks source link

testing: fix testing for ApplyPrivateMethod #127

Closed dushaoshuai closed 1 year ago

dushaoshuai commented 1 year ago

fake.PrivateMethodStruct.haveEaten returns false by default, so it's necessary to patch haveEaten to return true to expose bugs.

agiledragon commented 1 year ago

ok