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

description is not passed to RuleViolation for Option.each #55

Open
onmomo opened this issue Nov 10, 2015 · 4 comments
Open

description is not passed to RuleViolation for Option.each #55

onmomo opened this issue Nov 10, 2015 · 4 comments

Comments

@onmomo
Copy link

onmomo commented Nov 10, 2015

Please have a look at the branch where I hijacked one of the OptionOpsTests to show the issue.
I've added two tests. One works as expected and the description is passed to the RuleViolation. But as soon as one uses an Option in combination with "each" validator, the description is lost:

OptionOpsTests#"fail on Some that does not match the predicate with description"

onmomo added a commit to onmomo/accord that referenced this issue Nov 10, 2015
@danielgratzl
Copy link

+1

@stijn-starmind
Copy link

You get the correct description when you write test => (test.o as "description").each instead of _.o.each as "description".

@onmomo
Copy link
Author

onmomo commented Nov 16, 2015

works, thanks a lot!

@holograph
Copy link
Contributor

I wonder if this is reasonably expected behavior, or whether the two options are actually semantically distinct. I'll give it some thought when I'm less exhausted and see what I can come up with...

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

4 participants