[mocha-developer] Nested matchers

James Mead jamesmead44 at gmail.com
Mon Jan 28 19:03:40 EST 2008

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.


More information about the mocha-developer mailing list