RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: softwaregravy
Using rspec, I'm doing the following: (Geocoded Zipcode stores zipcode->lat/lon pairs)
gz = GeocodedZipcode.new(:zipcode => "12345", :latitude => "50.00", :longitude => "-75.00") gz.stub!(:geocode).and_return(true) gz.save!
I'm really not happy with this solution. Gotta be a better way.
How are people who are using this testing? I'm trying to find the best place to insert a hook to prevent actual geocoding during my tests.
Using rspec, I'm doing the following: (Geocoded Zipcode stores zipcode->lat/lon pairs)
I'm really not happy with this solution. Gotta be a better way.
How are people who are using this testing? I'm trying to find the best place to insert a hook to prevent actual geocoding during my tests.