Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] Mocha - new stubbing and mocking library released

Thread Tools

[ANN] Mocha - new stubbing and mocking library released

James Mead
Posts: n/a
Mocha is a Ruby mocking library with a syntax like that of JMock and
SchMock, but with a couple of useful extras. It comes in three parts:

Mocha - traditional mock objects with expectations and verification
Stubba - allows mocking and stubbing of methods on real (non-mock)
classes and instances
AutoMocha - magically provides mocks in the place of undefined classes

RDoc -
Download -

Mocha and Stubba have been created by amalgamating a number of
techniques developed by me and my Reevoo colleagues (Ben Griffiths,
Chris Roos and Paul Battley) into a common syntax. Both Mocha and
Stubba are in use on real-world Rails projects.

AutoMocha is more experimental and is at an earlier stage of
development. It's an attempt to make it easier to write true unit
tests (i.e. tests with no external dependencies).

You can find examples in the RDoc README and in the acceptance tests.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: mock 0.6.0, Python mocking and testing library Fuzzyman Python 0 08-22-2009 09:25 PM
[ANN] Mocha 0.9.5 released / Ruby 1.9 Compatibility James Mead Ruby 2 02-01-2009 11:09 PM
Mocking Objects with Typemock Isolator Mocking framework for .NetUnit Testing mo.sparrow ASP .Net 0 08-22-2008 11:55 AM
Stubbing out class: just a little toy Steve Midgley Ruby 0 12-16-2006 07:24 PM
stubbing methods on test objexct with jMock PeterS Java 2 11-09-2004 07:21 PM