[ANN] Mocha - new stubbing and mocking library released

J

James Mead

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 - http://mocha.rubyforge.org
Download - http://rubyforge.org/projects/mocha

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.

James
http://blog.floehopper.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top