Displaying 1 result from an estimated 1 matches for "eighttwoaskcustom".
Did you mean:
eighttwoaskcustomer
2007 Mar 04
4
Rails functional testing and Mocha
...9;s not
beautiful and of course breaks down if there are multiple customers
installed.
So I mucked around a bit and came of with the following. It''s very
ActiveRecord specific, but that''s what I''ve been dealing with..
I have a model Customer, and concrete subclass EightTwoAskCustomer
class EightTwoAskCustomer < Customer
def bill
#take all their money
end
end
A controller:
class TestController < ApplicationController
def bill
c = Customer.find params[:id]
c.bill
render :nothing => true
end
end
A functional test:
[snip boiler plate...