[rspec-users] Rspecing an enumerator from outside-in woes

Ben Mabey ben at benmabey.com
Sat Feb 28 23:08:17 EST 2009

Shot (Piotr Szotkowski) wrote:
> Ben Mabey:
>> Hmm.. maybe this is what you are looking for (From  
>> http://rspec.info/documentation/mocks/message_expectations.html):
> Thanks for your interest and the pointer, but my questions weren’t about 
> how to make my mocks yield to the code that calls them – if you look at 
> the code I attached previously you’ll see I already do that. :)

Ahh, sorry. I didn't see you had attached code. If I get a chance I'll 
take a closer look later.
> The questions were (among other things) about (a) how to elegantly spec 
> a method that is supposed to yield and (b) whether the #to_enum/#next 
> combo not triggering #should_receive expectations is a known bug of 
> RSpec 1.1.12 (under Ruby 1.9.1).
> — Shot
> ------------------------------------------------------------------------
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list