Is there any reason why a stub couldn't both yield and return? I'm
looking for a way to mock out a class I've made named AnonymousClass:
class AnonymousClass
def initialize(blk)
@klass = Class.new
@klass.instance_eval(blk) if block_given?
end
def new
@klass.new
On Aug 7, 2007, at 12:54 PM, David Chelimsky wrote:
On 8/7/07, Scott Taylor [EMAIL PROTECTED] wrote:
Is there any reason why a stub couldn't both yield and return?
Yes. Nobody ever asked for it :)
Again - this simply hasn't come up. Please add an RFE and feel free to
submit a patch.