Skip to content
Snippets Groups Projects
Commit fea4703b authored by Alex Reisner's avatar Alex Reisner
Browse files

Implement #name method for MaxMind lookup.

Also add test for method presence in all lookups.
parent c8670665
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,10 @@ require 'csv'
module Geocoder::Lookup
class Maxmind < Base
def name
"MaxMind"
end
private # ---------------------------------------------------------------
def results(query)
......
......@@ -3,6 +3,14 @@ require 'test_helper'
class LookupTest < Test::Unit::TestCase
def test_responds_to_name_method
Geocoder::Lookup.all_services.each do |l|
lookup = Geocoder::Lookup.get(l)
assert lookup.respond_to?(:name),
"Lookup #{l} does not respond to #name method."
end
end
def test_search_returns_empty_array_when_no_results
Geocoder::Lookup.all_services_except_test.each do |l|
lookup = Geocoder::Lookup.get(l)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment