rspec/rspec-mocks — pull request #236 by sheerun (2013-03-06 20:57:56+00:00)
Title: Allow for using class instance in block passed to stub method

It allows to use and test mocked object in block
passed to stub or using_self method (among others)

It is especially useful when stubbing #all_instances