3 ms·
I have always thought this is how mocks really should work - basically a two way stub. Mocks are usually (inevitably?) a per-test structure which makes them ou
by lifeisstillgood 10y ago
I have always thought this is how mocks really should work - basically a two way stub.
Mocks are usually (inevitably?) a per-test structure which makes them outrageously fragile and tempting to over mock to get a passing test
I prefer building something that acts like the mocked thing (ie a database) but does So both ends (it looks like a database to the web service and a web service to the database. Then the stub is my contract
It's awkward