Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Moved the geocoder stub to ./cofig/environments/test.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
AELOGICA committed Jul 1, 2015
1 parent 9bd7448 commit 429e547
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 14 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@
]
)

Geocoder::Lookup::Test.add_stub(
"Philippines", [
{
'latitude' => 12.7503486,
'longitude' => 122.7312101,
'address' => 'Manila, Mnl, Philippines',
'state' => 'Manila',
'state_code' => 'Mnl',
'country' => 'Philippines',
'country_code' => 'PH'
}
]
)

Geocoder::Lookup::Test.add_stub(
"Greenwich, UK", [
{
Expand Down
16 changes: 1 addition & 15 deletions config/initializers/geocoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,4 @@
# Reported as https://github.com/alexreisner/geocoder/issues/509
if Geocoder.config.lookup != :test
Geocoder.configure(:lookup => :nominatim)
end

Geocoder::Lookup::Test.add_stub(
"Philippines", [
{
'latitude' => 12.7503486,
'longitude' => 122.7312101,
'address' => 'Manila, Mnl, Philippines',
'state' => 'Manila',
'state_code' => 'Mnl',
'country' => 'Philippines',
'country_code' => 'PH'
}
]
)
end

0 comments on commit 429e547

Please sign in to comment.