Displaying 1 result from an estimated 1 matches for "billing_method".
2007 Apr 19
5
Best practice thoughts: Model helpers, mocks
...min_renewal
Renewal.new :attributes => min_renewal_attribs
end
def mock_renewal(stubs = {})
obj = mock_model(Renewal, {
:member_id => 1,
:date_renewed => Date.new(2007, 1, 1),
:membership_type_id => 1,
:shirt_size => ''M'',
:billing_method => ''BM'',
:amount_due => ''5000''
}.merge!(stubs))
obj.send(:__mock_handler).instance_eval "def inspect; @name; end"
obj
end
end
Below is an example of what I''d like to avoid, one of my controller
test setups. It see...