Mocha is a mocking & stubbing library for Ruby
Pull request Compare This branch is 4 commits ahead, 614 commits behind freerange:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
templates Renamed Matches parameter matcher to RegexpMatches for clarity. Added… Sep 6, 2007
test Fixed Lighthouse bug #32 - stub_everything should mean mock responds … Jan 29, 2009
vendor Added meta_project dependency for publish_packages rake task. Jun 8, 2007
COPYING Replace tabs with spaces. Jun 29, 2007
README Updated link to Chris Roos. Updated instructions for installing as a … Dec 30, 2008
Rakefile Added a release rake task to more fully automate the release process. Feb 1, 2009
mocha.gemspec Updated gemspec after 0.9.5 release to allow use of GitHub-built gem. Feb 1, 2009


= Mocha

Mocha is a library for mocking and stubbing using a syntax like that of JMock[].

It can be used with many testing frameworks e.g. Test::Unit[], RSpec[], test/spec[], expectations[], Dust[], MiniTest[] and even JtestR[].

Mocha provides a unified, simple and readable syntax for both traditional mocking and partial mocking.

Mocha was harvested from projects at Reevoo[] by me (James[]) and my (then) colleagues Ben[], Chris[] and Paul[].

== Download and Installation

Install the gem with the following command...

  $ gem install mocha
Or install the Rails[] plugin...

  $ script/plugin install git://

Or download Mocha...

== Examples

* Quick Start - {Usage Examples}[link:examples/misc.html]
* Traditional mocking - {Star Trek Example}[link:examples/mocha.html]
* Setting expectations on real classes - {Order Example}[link:examples/stubba.html]
* More examples on {Floehopper's Blog}[]
* {Mailing List Archives}[]

== License

Copyright Revieworld Ltd. 2006

You may use, copy and redistribute this library under the same terms as {Ruby itself}[] or under the {MIT license}[].