-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Ruby: ignore meta ci messages in testing #43
Conversation
Is this good to merge also (I've put changelogs in a bit prematurely for both fixes). |
ruby/lib/keys_checker.rb
Outdated
@@ -12,11 +12,13 @@ def compare(found, expected) | |||
|
|||
return errors if found_keys.sort == expected_keys.sort | |||
|
|||
missing_keys = (expected_keys - found_keys) | |||
missing_keys = (expected_keys - found_keys).reject do |key| | |||
ENV['CI'] && found.class == Cucumber::Messages::Meta && key == :ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to just do this regardless of the CI
env var? I recall your machine happened to have something set for this, but what if it doesn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In hindsight yes, that's not a negative. But what it means is running on ci won't check this key.
But if this key is just jargon from the CI executor then it seems reasonable to just never match on it. However then we enter the realm of not testing a part of the schema ever? Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say never match on it, JS and JVM do basically the same and the ci-environment
library does thorough enough testing of its own. Really the focal point of CCK is the messages about the tests themselves.
e096b55
to
78627d6
Compare
🤔 What's changed?
Add a test and new functionality to ignore both extra and missing keys that are of the Meta Envelope
⚡️ What's your motivation?
Fixes #41
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.