-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Modernize RSpec configuration #16699
Conversation
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.
Looks great, thanks again @dduugg!
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.
Looks good, thanks @dduugg! Remaining feedback can be addressed in follow-up PR, let's get this merged before it conflicts.
…pec.shared_examples|g'
Co-authored-by: Markus Reiter <me@reitermark.us>
23cb000
to
412852b
Compare
@dduugg Looks like some legit test failures post-rebase, sorry! |
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.
@dduugg, can you move your last commit to a separate PR? I couldn't really finish reviewing because the “Files changed” tab just hangs.
per above, "let's get this merged before it conflicts."
Merging this quickly is not a good reason to dismiss my request for being able to fully review this. I certainly can't review it any better now that it is merged.
I mean it's generally fine to make further changes to a future PR, but I was not even able to review this fully in order to provide this “remaining feedback”. |
You did provide a round of review here and your comments were addressed.
You can definitely review PRs post-merge, I do this all the time. If there's problems: they can be addressed in a future PR.
Another maintainer (me) was able to review it before it was merged. |
Sure, not if “Files changed” tab just hangs though, which is why I specifically requested to split this up. At least the individual commits seem to work now, they were also bugged by not showing the |
@@ -213,7 +213,7 @@ def install | |||
end | |||
end | |||
|
|||
describe ExecShellMetacharacters do | |||
::RSpec.describe ExecShellMetacharacters do |
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.
Can we unnest these instead?
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This PR enables some best-practice RSpec options (for reference, see the project initializer boilerplate in
rspec-core
). Specifically, it:require
and re-defining methods without undefining them first. (The latter can seem a bit silly, but I've found to be very useful in understanding code on occasion.)verify_partial_double
(second commit). This checks that the underlying object actually defines the doubled methods. This uncovered some cruft, though I had to use the escape hatch ofwithout_partial_double_verification
around ENV code that I couldn't make immediate sense of.disable_monkey_patching
(remaining commits). This setting removes RSpec methods from the top-level scope.