# Edgemocha

**URL:** <https://www.ruby-forum.com/t/edgemocha/79452>\
**Category:** Ruby\
**Created:** [December 15, 2006, 9:48am UTC](https://www.ruby-forum.com/t/edgemocha/79452 "2006-12-15T09:48:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 15, 2006, 9:48am UTC](https://www.ruby-forum.com/t/edgemocha/79452/1 "2006-12-15T09:48:19Z")

</div>

[http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edgemocha.html](http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edgemocha.html)

All the mocha talk pushed me to the edge 😉  
Hope it is helpful

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 15, 2006, 12:56pm UTC](https://www.ruby-forum.com/t/edgemocha/79452/2 "2006-12-15T12:56:34Z")

</div>

On 15/12/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [ruby-talk: Get the edge, that is edgemocha](http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edgemocha.html)
> 
> All the mocha talk pushed me to the edge 😉  
> Hope it is helpful

Thanks for your interest. I think you’ve given us more of an incentive  
to get another release out there.

Can you give me details of what didn’t work in release 0.3.2? This  
release has been out there for quite a while now without anyone else  
having problems. Or was the only problem that it didn’t work without  
Test::Unit? I guess it doesn’t say so explicitly in the documentation,  
but if you look at all the examples, this version was only ever  
intended to work in conjunction with Test::Unit.

You are correct that HEAD now separates itself from Test::Unit. This  
was mainly work done to help out the RSpec developers who at one stage  
wanted to integrate Mocha as the mocking component for RSpec. However  
they now have their own (very similar) mocking component.

I can’t really imagine why you would want to use Mocha outside a  
testing framework. Your example illustrates a couple of the problems  
of using Mocha outside a testing framework - when do expectations get  
verified and when do stubbed classes get put back to their original  
state. You need to decide when to trigger calls to e.g. verify\_stubs()  
and teardown\_stubs().

Probably better to post stuff like this to the Mocha developer list  
(see footer) rather than ruby-talk.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 15, 2006, 6:29pm UTC](https://www.ruby-forum.com/t/edgemocha/79452/3 "2006-12-15T18:29:33Z")

</div>

James M. wrote:

> On 15/12/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > [ruby-talk: Get the edge, that is edgemocha](http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edgemocha.html)
> > 
> > All the mocha talk pushed me to the edge 😉  
> > Hope it is helpful
> 
> Thanks for your interest. I think you’ve given us more of an incentive  
> to get another release out there.

I would certainly appreciate it and I appreciate you feedback.

> Can you give me details of what didn’t work in release 0.3.2? …  
> Compare  
> ~$ sudo gem install mocha  
> Attempting local installation of ‘mocha’  
> Successfully installed mocha-0.3.2  
> ~$ irb  
> irb(main):001:0\> require ‘rubygems’  
> =\> true  
> irb(main):002:0\> require ‘test/unit’  
> =\> true  
> irb(main):003:0\> require ‘mocha’  
> =\> false  
> irb(main):004:0\> Object.methods.include? “expects”  
> =\> false  
> irb(main):005:0\>

Notice the false after the require ‘mocha’; However, it is installed. I  
tried on Linux and Windows, same issue. Now using the head revision…  
~$ irb  
irb(main):001:0\> require ‘mocha’  
=\> true  
irb(main):002:0\> include Mocha::SetupAndTeardown  
=\> Object  
irb(main):003:0\> setup\_stubs  
=\> #\<Mocha::Central:0xb78bf49c @stubba\_methods=[]\>  
irb(main):004:0\> Object.ex  
Object.expects Object.extend  
irb(main):004:0\> Object.methods.include? “expects”  
=\> true  
irb(main):005:0\>

> Probably better to post stuff like this to the Mocha developer list  
> (see footer) rather than ruby-talk.

Absolutely, no problem, just thought there might be others in the same  
boat. I will certainly continue this there. Thanks
