search for: vehicals

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

Did you mean: vehical1
2007 Sep 05
4
Mocking to spec a sort_by method
...:mph).returns(250) comparer.add_vehical([@vehical1, @vehical2]) comparer.sort_by(:mph) The comparer is an object that has a basic "stack like" functionality, add_vehical is the method to add objects to the stack. My sort_by method in the comparer class looks like def sort_by(symb) @vehicals.sort_by{|vehical| vehical[symb] } end where @vehicals is an instance variable array (the stack). Running my spec gives the following error, Mocha::ExpectationError in ''Comparer should be sortable on a specific symbol'' #<Mock:0x251b7c8>.[](:mph) - expected calls: 0, actual...