bogus icon indicating copy to clipboard operation
bogus copied to clipboard

Stubbing method to yield given block

Open mostlyobvious opened this issue 11 years ago • 2 comments

Currently bogus does not support stubbing method to yield given block as in RR or rspec-mocks.

mostlyobvious avatar Oct 09 '13 19:10 mostlyobvious

:+1: I've hit the same issue today :(

fgrehm avatar Jan 04 '14 17:01 fgrehm

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.

psyho avatar Apr 29 '14 08:04 psyho