3 ms·
As always theres a middle ground between the extremes of MOCK-ALL-TEH-THINGS or mock nothing!! Since reading Sandi Metz's very fantastic "Practical Object-orie
by trustfundbaby 12y ago
As always theres a middle ground between the extremes of MOCK-ALL-TEH-THINGS or mock nothing!!
Since reading Sandi Metz's very fantastic "Practical Object-oriented design in ruby" it clear to me that mocking is great for checking that objects other the one under test receive messages sent by the methods being tested (makes tests easier to setup and write usually). If I find that I'm doing too much mocking, then its usually because the method I'm using is doing way too much. FWIW.