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

Optionally tolerate when no route matches #9

Open
schnittchen opened this issue Jun 12, 2015 · 4 comments
Open

Optionally tolerate when no route matches #9

schnittchen opened this issue Jun 12, 2015 · 4 comments

Comments

@schnittchen
Copy link
Member

Use case would be things like remaining.pend.

Totally doable, but what should it look like?

@schnittchen
Copy link
Member Author

This is the current suggested workaround:

remaining.pass if aygabtu_matching_routes(remaining).any?

@schnittchen
Copy link
Member Author

We should also consider making aygabtu_matching_routes official by documenting it (tests do exist).

@schnittchen
Copy link
Member Author

For clarity, .pass should be .pend to match the initial post here.

@schnittchen
Copy link
Member Author

I'm currently thinking about introducing a .tolerate_no_route_matching scope method. It would provide an explicit solution to this.

But I don't like the name, it's a bit too long.

And maybe it's a dangerous tool to give to people. Maybe it should be disallowed to open a context block on such a scope.

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

No branches or pull requests

1 participant