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

Detect missing super calls in setup and teardown #111

Open
andyw8 opened this issue Oct 28, 2020 · 3 comments
Open

Detect missing super calls in setup and teardown #111

andyw8 opened this issue Oct 28, 2020 · 3 comments
Labels
feature request Request for new functionality

Comments

@andyw8
Copy link
Contributor

andyw8 commented Oct 28, 2020

From the minitest README:

If you want to extend your test using setup/teardown via a module, just make sure you ALWAYS call super.

I'd love to have a cop to check for this.

Is your feature request related to a problem? Please describe.

While debugging some intermittently test failures, I found a missing setup call.

Describe the solution you'd like

.

Describe alternatives you've considered

.

Additional context

.

@koic
Copy link
Member

koic commented Oct 29, 2020

I think this is worth mentioning in the style guide. Can you open the proposal with example code to the Minitest Style Guide?
https://github.com/rubocop-hq/minitest-style-guide

@andyw8
Copy link
Contributor Author

andyw8 commented Oct 29, 2020

rubocop/minitest-style-guide#35

@tejasbubane
Copy link
Contributor

tejasbubane commented Nov 5, 2021

Static analysis does not know if included module contains setup and teardown methods - so I am not sure if this cop can be implemented effectively.

@koic koic added feature request Request for new functionality and removed enhancement New feature or request labels Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants