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

This is why mocking and stubbing sucks:
http://cardarella.blogspot.com/2008/12/case-against-mocking-and-stubbing.html

This is why mocking and stubbing is awesome:
http://blog.davidchelimsky.net/2008/12/11/a-case-against-a-case-against-mocking-and-stubbing

And, this is what the godfather says about this:
http://martinfowler.com/articles/mocksArentStubs.html

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


0 comments: