Created
May 12, 2014 22:13
-
-
Save linko/45a4c20c7dad91c77692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Geocoder.configure(:lookup => :test) | |
Geocoder::Lookup::Test.set_default_stub( | |
[ | |
{ | |
'latitude' => 40.7143528, | |
'longitude' => -74.0059731, | |
'address' => 'New York, NY, USA', | |
'state' => 'New York', | |
'state_code' => 'NY', | |
'country' => 'United States', | |
'country_code' => 'US' | |
} | |
] | |
) | |
Geocoder::Lookup::Test.add_stub( | |
"New York, NY", [ | |
{ | |
'latitude' => 40.7143528, | |
'longitude' => -74.0059731, | |
'address' => 'New York, NY, USA', | |
'state' => 'New York', | |
'state_code' => 'NY', | |
'country' => 'United States', | |
'country_code' => 'US' | |
} | |
] | |
) | |
Geocoder::Lookup::Test.add_stub( | |
"Near with New York, NY", [ | |
{ | |
'latitude' => 40.9143528, | |
'longitude' => -74.1159731, | |
'address' => 'Near with New York, NY, USA', | |
'state' => 'Near with New York', | |
'state_code' => 'NY', | |
'country' => 'United States', | |
'country_code' => 'US' | |
} | |
] | |
) | |
Geocoder::Lookup::Test.add_stub( | |
"Far from New York, NY", [ | |
{ | |
'latitude' => 70.7143528, | |
'longitude' => 74.0059731, | |
'address' => 'Far from New York, NY, USA', | |
'state' => 'Far from New York', | |
'state_code' => 'NY', | |
'country' => 'United States', | |
'country_code' => 'US' | |
} | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment