[mocha-developer] Nested matchers

Ned Wolpert ned.wolpert at gmail.com
Tue Jan 29 10:22:31 EST 2008


I wasn't sure that this was the same thing... but I did notice that it
broke (or I should stay, stopped working as expected) in the last
mocha release... I'm going to investigate this today and if I think
there is a problem with Mocha, I'll post a test-case.

On Jan 28, 2008 5:03 PM, James Mead <jamesmead44 at gmail.com> wrote:
> On 28/01/2008, Ned Wolpert <ned.wolpert at gmail.com> wrote:
> >
> > I'm also seeing a problem.  I haven't researched it enough, but here's
> > what's going on in a nutshell...
> >
> > I have this line:
> >
> >   outfile.stubs
> > (:each_line).times(2).returns('1234512123\n','abcdefgxyz\n')
> >
> > and then the object 'outfile' is passed in to another method that
> > called 'each_line' in a loop with result from the called being
> > 'yield'ed... In a nutshell, like this
> >
> >     fwr.process_file(outfile) do |array|
> >       validate_data(array)
> >     end
> >
> > I'm not sure exactly where the error is, but this code hasn't changed
> > in a long time, but with the latest mocha, broke. I'm still
> > researching what is actually broken, but I kinda hope that this bit of
> > debug is helpful...
> >
>
> It's not obvious that this is the same error or bug.
>
> Can you give more details i.e. the simplest self-contained failing test (and
> code under test) you can write or (ideally) a failing acceptance test like
> Duncan did.
>
> Thanks.
> --
> James.
> http://blog.floehopper.org
> http://tumble.floehopper.org
>
> _______________________________________________
> mocha-developer mailing list
> mocha-developer at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mocha-developer
>



-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe


More information about the mocha-developer mailing list