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

Revert "Replace method_source gem with stdlib equivalent" #45972

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Sep 8, 2022

Reverts #45904

on_def doesn't work with the declarative test definition since it will not trigger for those methods. We might make this work by hooking to method calls nodes using Ripper but since this broke the filtering I'm reverting. I'm ok with a new PR that doesn't break it. I'll also make sure this doesn't regress by making sure a test fails when we forget to filter the declarative definition.

@rails-bot rails-bot bot added the railties label Sep 8, 2022
In 7690290, the filter was not finding the end of the methods defined
using the `test do` syntax. This would cause more than 1 test to be
selected depending on the line number passed as argument.

The previous test wasn't failing because the two tests asked to run
where one after the other and the filter, even broken would only
run those two tests. By changing the test definition order we trigger
the bug introduced by that commit.
@rafaelfranca rafaelfranca merged commit eed45ca into main Sep 8, 2022
@rafaelfranca rafaelfranca deleted the revert-45904-drop-method-source branch September 8, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant