Skalar / google_distance_matrix

Ruby client for The Google Distance Matrix API.
MIT License
58 stars 45 forks source link

route/s_for methods not working for places built from hashes #45

Closed brauliomartinezlm closed 5 years ago

brauliomartinezlm commented 5 years ago

While using this gem I realized that if I initialized Place object to build the matrix with hashes and then used same hashes as parameters for the route_for and routes_for methods, it didn't work due to the lack of @extracted_attributes_from set.

I'm opening a PR with tests to make it more clear. Current tests are using double to create a mock object but hashes are not considered in route_finder tests. They are considered in a separate flow when initializing Place objects tho.

thhermansen commented 5 years ago

Thank you. I have merged your pull request.