-
-
Notifications
You must be signed in to change notification settings - Fork 284
RSpec aliases runtime matchers #956
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ def on_block(node) | |
|
|
||
| def in_spec_block?(node) | ||
| node.each_ancestor(:block).any? do |ancestor| | ||
| Examples::ALL.include?(ancestor.method_name) | ||
| Examples.all(ancestor.method_name) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code reads a bit weird. It looks like there’s a question mark missing, i.e. Probably not something we need to fix now, but just an observation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed. Those new helpers fit patterns more. Another way is to check if an argument has been passed (used in a pattern), or not. If not - just return a list, and this will make both
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning different types (boolean vs array) from the same method also isn’t great. Maybe we should call I think we should just leave it for now. |
||
| end | ||
| end | ||
| end | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.