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

Avoid lifecycle methods not intended for test developers #47

Closed
andyw8 opened this issue Jun 17, 2022 · 0 comments · Fixed by #56
Closed

Avoid lifecycle methods not intended for test developers #47

andyw8 opened this issue Jun 17, 2022 · 0 comments · Fixed by #56

Comments

@andyw8
Copy link
Contributor

andyw8 commented Jun 17, 2022

The following methods have a note that they are "These are meant for library writers, NOT for regular test authors."

  • after_setup
  • after_teardown
  • before_setup
  • before_teardown

https://ruby-doc.org/stdlib-3.1.2/libdoc/minitest/rdoc/Minitest/Test/LifecycleHooks.html

I suspect people may incorrectly use these because are similarly named to the before and after hooks in RSpec.

(I think this would be a helpful addition to rubocop-minitest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant