search for: distance_to

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

Did you mean: distance_cm
2012 Aug 03
1
Mock_model not recognizing act_as_mappable
.... Upon investigation, when I compare the available methods for both the Location model and the mock_model, I found act_as_mappable is missing from the mock_model. Which accounts for why it was failing in the stub @location.stub!(:sort_by_distance_from). It gives an error "unexpected message :distance_to" and the :distance_to method comes from act_as_mappable. When I switch to using Factory for the @location instance, the test passed. How should I go about using the mock_model for a situation as this, without resorting to using Factory? I believe this issue also the same for other act_as_ s...