Class: Decidim::Map::Provider::Autocomplete::Test
- Inherits:
-
Autocomplete
- Object
- Autocomplete
- Decidim::Map::Provider::Autocomplete::Test
- Defined in:
- lib/decidim/dev/test/rspec_support/geocoder.rb
Defined Under Namespace
Classes: Builder
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.add_stub(address, coordinates) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/decidim/dev/test/rspec_support/geocoder.rb', line 54 def self.add_stub(address, coordinates) stubs.push( properties: address.is_a?(Hash) ? address : { street: address }, geometry: { coordinates: coordinates.reverse } ) end |
.clear_stubs ⇒ Object
61 62 63 |
# File 'lib/decidim/dev/test/rspec_support/geocoder.rb', line 61 def self.clear_stubs @stubs = [] end |
.stubs ⇒ Object
50 51 52 |
# File 'lib/decidim/dev/test/rspec_support/geocoder.rb', line 50 def self.stubs @stubs ||= [] end |
Instance Method Details
#builder_options ⇒ Object
65 66 67 |
# File 'lib/decidim/dev/test/rspec_support/geocoder.rb', line 65 def { url: configuration.fetch(:url, nil) }.compact end |