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

Configuration matching is not exiting correctly on no match #16

Open
patrickvinograd opened this issue Apr 12, 2019 · 0 comments
Open

Comments

@patrickvinograd
Copy link
Contributor

Betamocks::Configuration#find_endpoint is trying to return silently if the request doesn't match any configured hosts/routes/etc. But it's using

return nil unless endpoints

This results in falling through to raising an ArgumentError with "Unable to uniquely identify request! with Matched endpoints: [] instead of returning silently.

But endpoints is an empty array and an empty array returns truthy in Ruby, so I don't think this is working as intended. But I'd also consider fixing this in concert with #12 so that the behavior is more clear about why a request is not being matched by betamocks.

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

1 participant