From: Fernando Guillen Date: 2010-08-02T23:12:33+09:00 Subject: Re: Mocking a method with a block Brian Candler wrote: > Fernando Guillen wrote: >> Is this possible?.. am I completely lost?.. is there any better way to >> do this? > > I'd suggest you use an existing mocking library like "mocha". This was how I started to try mock the Net::POP3. But instead of using the .yields method, that I didn't know about, I tried to mock directly the Net::POP3.start method and this didn't work. Thanks a lot for your comprehensive examples and also for the re-factoring suggestion for an easier mock. Best regards. f. -- Posted via http://www.ruby-forum.com/.