Agile Web Development

Build it. Launch it. Love it.

Mocha

The Mocha plugin allows mocking and stubbing within tests using a syntax like that of JMock and SchMock.

The big advantage it has over other mocking and stubbing libraries is its ability to mock or stub individual class or instance methods on concrete classes.

Mocha has been created by amalgamating a number of techniques developed by James and my Reevoo colleagues Ben, Chris and Paul into a common syntax. It is currently in use on real-world Rails projects.

Copyright Revieworld Ltd. 2006

You may use, copy and redistribute this library under the same terms as Ruby itself (see http://www.ruby-lang.org/en/LICENSE.txt).

Vitals

Home http://mocha.rubyforge.org
Repository svn://rubyforge.org/var/svn/mocha/trunk
License Rails' (MIT)
Rating (56 votes)
Owner James Mead
Created 16 August 2006

Comments

  • Avatar
    8 May 2007

    Mocha is absolutely awesome. It has greatly helped my unit tests. I find myself writing more test cases now that it takes a fraction of the time fixtures did.

    Thanks a lot!

Add a comment