geocoder
geocoder copied to clipboard
Rspec configure overriden
Expected behavior
Geocoder config in Rspec.configure
should take precedence in test environment.
Actual behavior
I'm using :mapbox
as a default lookup in my app but there's one specific callback where I need to use Nominatim instead (Geocoder.search([latitude, longitude], lookup: :nominatim)
).
However, because of this, despite having setup Geocoder to use :test
in my Rspec settings (Geocoder.configure(lookup: :test, ip_lookup: :test)
) it's using Nominatim when that callback is executed. Removing lookup: :nominatim
does make it use the :test
lookup in the test environment.
Environment info
- Geocoder version: 1.8.1
- Rails version: 7.1.3