testing-concept-using-mocks-to-design-the-interfaces

mocks-vs-stubs#avdi-only-reason-to-mock

"I'll also point out that as far as I'm concerned, the only... and I mean only reason I use mocks is to guide design during TDD. If I'm not writing tests first, there is very little point writing mocks. I believe I am consistent with the authors of GOOS (and inventors/popularizers of mocking) in this view." - Avdi Grimm somewhere on parley, I believe.

 

In talk-how-to-stop-hating-your-test-suite he also talks about using them in the same way.


This isn't really about mocks, but how tests can cause you to design your code.

book-rails-4-test-prescriptions#a-passing-test-does-not-drive-you-to-change-code

"In strict TDD you would avoid writing a test that you expect to pass, because a passing test doesn't normally drive you to change the code."

 

At 2830 the top of the tree is a delegator that doesn't do very much. He figures out what the sub pieces should do by determining what he wishes other pieces of code would do for him. He does that by mocking them while creating (#)

Referring Pages

testing-concept-stages-of-testing