|
|
|
|
|
by throw_m239339
2072 days ago
|
|
> Why do fakes need tests, but mocks don't? because no new class or method is created with mocks, it's merely declarative, no new logic is created than needs to be tested. Fakes very much have logic since they are implementations of classes. > Or do you have a rule in your company that every class needs a test? Maybe this rule is the problem. No Fakes are, not the fact that every unit should be tested. Fakes are very much a unit, the fact that they are classes is irrelevant. furthermore: https://news.ycombinator.com/item?id=24774752 which demonstrates my point. I don't want to have to write tests for tests. |
|