Re:Favor real dependencies for unit testing
by TheReveller on Saturday January 15, 2022 @03:04AM
(#29944661)
Also error conditions - telling a fake to give you a specific error before you run the test is no different from telling a mock to do it.
[ Parent
| on HN ]
Re:Favor real dependencies for unit testing
by marcosdumay on Saturday January 15, 2022 @08:16AM
(#29946088)
It is different. You tell the mock to give you an specific error with specific information, while you tell the fake to give you the error for an specific condition.
It is subtle and may not be worth the time, but again, it may be.