Displaying 1 result from an estimated 1 matches for "stops_stubbing".
2007 Aug 08
1
Mocking Time, delegating to original object
...returns(return_value))
end
else
add_expectation(Stub.new(self, method_name_or_hash, backtrace))
end
end
end
class Expectation
def delegates
@return_values += ReturnValues.new(Delegator.new(self))
end
alias :stops_mocking :delegates
alias :stops_stubbing :delegates
end
class Delegator
def initialize expectation
@expectation = expectation
end
def evaluate
@expectation.mock.stub_method.stubbee.send(@expectation.mock.stub_method.hidden_method)
end
end
end
class Object
def expects(symbol)
method = stubba_m...