Displaying 1 result from an estimated 1 matches for "residual_valu".
Did you mean:
residual_value
2006 Dec 15
3
Partial mock when a complex return value is required
...plicate the code in the spec.
Here is a cut-down version of my class:
class CapDerivativeInRegistrationBand < SimpleDelegator
...
def cap_future_residuals
@cap_future_residuals ||=
cap_future_residuals_for_registration_date(registration_year,
registration_month)
end
def residual_value(request_mileage, request_term)
...
cap_future_residuals.each do |r|
...
end
...
# LOADS of other stuff going on here that relies on stuff
produced from the above loop
...
end
end
And here is the offending spec:
specify "should prefetch the fut...