qur / withmock

Automatic Go package mock generation tool
Other
71 stars 9 forks source link

Mock enabling shouldn't be controlled at source level #23

Closed qur closed 10 years ago

qur commented 10 years ago

By defaulting mocking to on in the generated source when a package is marked for mocking in one package being tested, every other package that uses that same package will also get mocking enabled - even if it didn't mark it for mocking.

The enabling of mocking needs to be done at runtime (or buildtime) if things are to work properly.