search for: capderivativeinregistrationband

Displaying 1 result from an estimated 1 matches for "capderivativeinregistrationband".

2006 Dec 15
3
Partial mock when a complex return value is required
...ave to simulate the return value, which is about 27 ActiveRecord objects with about 7 parameters. The only way I could stop the spec failing (because the rest 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| ......