Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 3c1f4c5b75
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (22 sloc) 0.716 kB
require 'test_helper'
module Graticule
module Geocoder
class LocalSearchMapsTest < Test::Unit::TestCase
def setup
@geocoder = LocalSearchMaps.new
URI::HTTP.responses = []
URI::HTTP.uris = []
end
def test_success
prepare_response :success
location = Location.new :latitude => 51.510036, :longitude => -0.130427
assert_equal location, @geocoder.locate(:street => '48 Leicester Square',
:locality => 'London', :country => 'UK')
end
private
def prepare_response(id = :success)
URI::HTTP.responses << response('local_search_maps', id, 'txt')
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.