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

Make with_info_handler take rest args to fix upstream arity change #28

Merged
Merged
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: 5 additions & 3 deletions lib/minitest/hooks/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ def new(name)
# When running the specs in the class, first create a singleton instance, the singleton is
# used to implement around_all/before_all/after_all hooks, and each spec will run as a
# dup of the singleton instance.
def with_info_handler(reporter, &block)
def with_info_handler(*args, &block)
@instance = new(NEW)
@instance.time = 0
@instance.name = "around_all"


reporter, *_ = args

begin
@instance.around_all do
begin
Expand All @@ -78,7 +80,7 @@ def with_info_handler(reporter, &block)
failed = true
_record_minitest_hooks_error(reporter, @instance)
else
super(reporter, &block)
super
end
ensure
@instance.capture_exceptions do
Expand Down
Loading