Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow address_components_of_type for Geocoder::Result::Test #1628

Open
loqimean opened this issue Aug 15, 2023 · 1 comment
Open

Allow address_components_of_type for Geocoder::Result::Test #1628

loqimean opened this issue Aug 15, 2023 · 1 comment

Comments

@loqimean
Copy link

Expected behavior

To have all methods or only this

Actual behavior

undefined method `address_components_of_type' for #<Geocoder::Result::Test:..

Steps to reproduce

mock request and run a test that calls an address_components_of_type method

Environment info

No one

  • Geocoder version: latest
  • Rails version: 7
  • Database (if applicable): postgresql
@alexreisner
Copy link
Owner

Hmm, so this method is defined for the Google result classes because it's useful for handling the format in which Google's APIs return data. It's not relevant to other result types that have different structures. The Test result class reflects what's in the Base class. I'm not sure what you're trying to do that this is an issue. You might want to look at the Google unit tests to see how mocking is usually done in the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants