[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[HOWTO] Edgemocha

John Pywtorak

12/15/2006 8:48:00 AM

http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edge...

All the mocha talk pushed me to the edge ;-)
Hope it is helpful


3 Answers

James Mead

12/15/2006 11:54:00 AM

0

On 15/12/06, jpywtora@calpoly.edu <jpywtora@calpoly.edu> wrote:
> http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edge...
>
> 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.
http://blog.floe...
http://rubyforge.org/mailman/listinfo/mocha...

John Pywtorak

12/15/2006 5:29:00 PM

0

James Mead wrote:
> On 15/12/06, jpywtora@calpoly.edu <jpywtora@calpoly.edu> wrote:
>> http://ruby-talk.blogspot.com/2006/12/get-edge-that-is-edge...
>>
>> 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

Dano

2/20/2012 6:10:00 PM

0

"Arthur Lipscomb" wrote in message news:jhu1kc$jdg$1@dont-email.me...

On 2/16/2012 8:08 AM, anim8rfsk wrote:
> shawn<nanoflower@gNOTmail.com> wrote:
>> On Thu, 09 Feb 2012 10:10:04 -0800, ~consul
>> <consul@dolphinsTAKEAWAY-cove.com> wrote:
>>
>>> 'tis on this 2/9/2012 9:21 AM, wrote Jerry Brown thus to say:
>>>> On Thu, 09 Feb 2012 11:46:12 -0500, David<dimlan17@yahoo.com> wrote:
>>>>> http://www.variety.com/article/VR...
>>>>> Syfy developing spec drama
>>>>> 'Eureka,' 'Terminator' EPs team to produce 'Bob from Corporate'
>>>>> By JON WEISMAN, STUART LEVINE
>>>>> Rochford, an AFI alum, wrote the pilot about a clandestine
>>>>> organization, known only as "Corporate," that solves dangerous
>>>>> mysteries caused by science and technology gone awry, topped by an
>>>>> enigmatic leader who operates with a strong moral code and "a very big
>>>>> gun."
>>>> So, will it crossover with Eureka (the cast should be freely
>>>> available), Warehouse 13 and Alphas?
>>>
>>> Oh how I miss Better off Ted. :(
>>
>> Me too. Luckily I still have some episodes saved off that I will watch
>> occasionally. Mr Sunshine captured a bit of the madness that was
>> Better Off Ted, but only a bit.
>
> There are unaired eps of Mr. Sunshine on the DVD.
>

I have no recollection of this series ever having existed but I see it
ran last year on ABC. Unfortunately the DVD is not available from Netflix.

============================================

Trust me. You're better off.