From 85a61aa0d39fd64812b81a48668f6b98671cea82 Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:53:19 -0500 Subject: [PATCH] Add annotation for `after` for minitest-hooks --- index.json | 8 ++++++++ rbi/annotations/minitest-hooks.rbi | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 rbi/annotations/minitest-hooks.rbi diff --git a/index.json b/index.json index defc433..cdd2f0c 100644 --- a/index.json +++ b/index.json @@ -79,6 +79,14 @@ "lhm": {}, "lhm-shopify": {}, "minitest": {}, + "minitest-hooks": { + "dependencies": [ + "minitest" + ], + "requires": [ + "minitest/hooks" + ] + }, "mocha": { "requires": [ "mocha/api" diff --git a/rbi/annotations/minitest-hooks.rbi b/rbi/annotations/minitest-hooks.rbi new file mode 100644 index 0000000..17b539c --- /dev/null +++ b/rbi/annotations/minitest-hooks.rbi @@ -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