Mocking and Stubbing FTW! Wait, was it WTF instead?

This is why mocking and stubbing sucks:

This is why mocking and stubbing is awesome:

And, this is what the godfather says about this:

Who else is confused? I think the TDD/BDD community needs to start explaining themselves more regarding the principles of testing. We need a "pattern" for TDD/BDD testing for Ruby and Rails (Merb) projects.

I have had many conversations/debates regarding this very issue. And, every time I read one of these articles, I go from one side to the other.

So far, here are my conclusions regarding testing:

* TDD/BDD is hard.
* TDD/BDD is necessary.
* 100% coverage is unrealistic.
* Doing "red, green, refactor" all the time almost never happens in the real world.
* Someone needs to write an up-to-date and definitive book regarding this subject matter, and end the debate.

About this entry