Using Mocha – A review
Wednesday, August 1st, 2007 by Thilo UtkeFor aprox. 3 months we have been using mocha now. And we promised to get back to this subject when we passed our 2000th revision.
In this post I’d like to share some expirence we made while using mocha. But first a short introduction to mocha taken from the rubyforge page.
Mocha is a library for mocking and stubbing using a syntax like that of JMock, and SchMock. One of its main advantages is that it allows you to mock and stub methods on real (non-mock) classes and instances.
We started to use mocha on an existing test suite and changed our test code in place when we wrote a new test or had to update old ones. The transition was mostly painless, there were three things where we stumbled.
(more…)



