bogus
bogus copied to clipboard
Stubbing method to yield given block
Currently bogus does not support stubbing method to yield given block as in RR or rspec-mocks.
:+1: I've hit the same issue today :(
It would be easy to add a support for this for stubbing/mocking, but marrying it with contracts is definitely non-trivial.
I'll have to figure out how to record the values yielded by a method. If it turns out to be impossible (and I think that considering all the border cases with instance_exec and such it might be), then we'll have to decide if it's worth having a feature that does not integrate well with the rest of the library.