search for: membershiptyp

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

Did you mean: membershiptype
2007 Apr 19
5
Best practice thoughts: Model helpers, mocks
...d end Below is an example of what I''d like to avoid, one of my controller test setups. It seems like each context, I end up pasting the previous contexts setup, and then adding a few more lines, until it ends up... setup do mem_types = Array.new @membership_type1 = mock_model(MembershipType) @membership_type1.stub!(:id).and_return(1) @membership_type1.stub!(:name).and_return(''Name'') @membership_type1.stub!(:price_cents).and_return(5000) mem_types << @membership_type1 @membership_type2 = mock_model(MembershipType) @membership_type2.stub!...