test/test_bing_geocoder.rb in geokit-1.13.1 vs test/test_bing_geocoder.rb in geokit-1.14.0

- old
+ new

@@ -12,11 +12,11 @@ end # the testing methods themselves def test_bing_full_address key = geocoder_class.key - url = "#{@base_url}/#{URI.escape(@full_address)}?key=#{key}&o=xml" + url = "#{@base_url}/#{CGI.escape(@full_address)}?key=#{key}&o=xml" res = geocode(@full_address, :bing_full) assert_equal 'CA', res.state assert_equal 'San Francisco', res.city assert_array_in_delta [37.792332, -122.393791], res.to_a assert res.country == 'United States' @@ -26,11 +26,11 @@ end def test_bing_full_address_au address = '440 King William Street, Adelaide, Australia' key = geocoder_class.key - url = "#{@base_url}/#{URI.escape(address)}?key=#{key}&o=xml" + url = "#{@base_url}/#{CGI.escape(address)}?key=#{key}&o=xml" res = geocode(address, :bing_full_au) assert_equal 'SA', res.state assert_equal 'Adelaide', res.city assert_array_in_delta [-34.934582, 138.600784], res.to_a assert res.country == 'Australia' @@ -41,11 +41,11 @@ end def test_bing_full_address_de address = 'Platz der Republik 1, 11011 Berlin, Germany' key = geocoder_class.key - url = "#{@base_url}/#{URI.escape(address)}?key=#{key}&o=xml" + url = "#{@base_url}/#{CGI.escape(address)}?key=#{key}&o=xml" res = geocode(address, :bing_full_de) assert_equal 'BE', res.state assert_equal 'Berlin', res.city assert_array_in_delta [52.518596, 13.375502], res.to_a assert res.country == 'Germany' @@ -57,10 +57,10 @@ end def test_bing_country address = 'Australia' key = geocoder_class.key - url = "#{@base_url}/#{URI.escape(address)}?key=#{key}&o=xml" + url = "#{@base_url}/#{CGI.escape(address)}?key=#{key}&o=xml" res = geocode(address, :bing_au) assert_equal nil, res.state assert_equal nil, res.city assert_array_in_delta [-25.585, 134.504], res.to_a assert res.country == 'Australia'