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

Structure Test result data like other results,

viz: add `coordinates` attribute and remove `latitude` and `longitude`.

Fixes #1258 and #1302.
parent e329eb36
No related branches found
No related tags found
No related merge requests found
......@@ -536,7 +536,7 @@ With the above stub defined, any query for "New York, NY" will return the result
Notes:
- Keys must be strings not symbols when calling `add_stub` or `set_default_stub`. For example `'latitude' =>` not `latitude:`.
- Keys must be strings (not symbols) when calling `add_stub` or `set_default_stub`. For example `'country' =>` not `:country =>`.
- To clear stubs (e.g. prior to another spec), use `Geocoder::Lookup::Test.reset`. This will clear all stubs _including the default stub_.
- The stubbed result objects returned by the Test lookup do not support all the methods real result objects do. If you need to test interaction with real results it may be better to use an external stubbing tool and something like WebMock or VCR to prevent network calls.
......
......@@ -15,7 +15,7 @@ module Geocoder
end
end
%w[latitude longitude neighborhood city state state_code sub_state
%w[coordinates neighborhood city state state_code sub_state
sub_state_code province province_code postal_code country
country_code address street_address street_number route geometry].each do |attr|
add_result_attribute(attr)
......
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