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
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
On 15/12/06, [email protected] [email protected] wrote:
ruby-talk: Get the edge, that is edgemocha
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.
James M. wrote:
On 15/12/06, [email protected] [email protected] wrote:
ruby-talk: Get the edge, that is edgemocha
All the mocha talk pushed me to the edge
Hope it is helpfulThanks 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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs