2 ms·
Real instances of the dependant class. A "unit test purist" would likely shun this, but I take more of a realist approach; in many real-world cases, mock-heavy
by GordonS 7y ago
Real instances of the dependant class.
A "unit test purist" would likely shun this, but I take more of a realist approach; in many real-world cases, mock-heavy tests make for brittle tests that don't give confidence of correctness.
I tend to focus on integration tests, as I find these provide the most value while still executing very quickly (depending on the stack, obv).
That doesn't mean I don't use unit tests, or that I never use mocks - I just use mocks very sparingly.