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

Add annotation for before and after for Minitest::HooksSpec #300

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
"lhm": {},
"lhm-shopify": {},
"minitest": {},
"minitest-hooks": {
"dependencies": [
"minitest"
],
"requires": [
"minitest/hooks"
]
},
"mocha": {
"requires": [
"mocha/api"
Expand Down
9 changes: 9 additions & 0 deletions rbi/annotations/minitest-hooks.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# typed: true

class Minitest::HooksSpec
sig { params(type: T.nilable(Symbol), block: T.proc.bind(T.attached_class).void).void }
def self.before(type = nil, &block); end

sig { params(type: T.nilable(Symbol), block: T.proc.bind(T.attached_class).void).void }
def self.after(type = nil, &block); end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this originally came from a comment by Vini, but I've updated it to better match the implementation.