Displaying 1 result from an estimated 1 matches for "registration_year".
2006 Dec 15
3
Partial mock when a complex return value is required
...of the method depends on this return value) was to
duplicate 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 offen...