search for: expectationload

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

Did you mean: expectationloader
2007 Mar 04
4
Rails functional testing and Mocha
...controller: class TestController < ApplicationController def bill c = Customer.find params[:id] c.bill render :nothing => true end end A functional test: [snip boiler plate] require ''eight_two_ask_customer'' class EightTwoAskCustomer include Mocha::ExpectationLoader end [snip more boiler plate] # Replace this with your real tests. def test_bill_customer c = customers(:customer1) EightTwoAskCustomer.any_instance_with_id( c.id).expects(:bill) post :bill, :id => c.id end This does mostly what I want, the test passes. If I comment ou...