Skip to content

Commit 3991362

Browse files
committed
Require assertions in assert_separately
1 parent cb4353c commit 3991362

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tool/lib/core_assertions.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ def assert_separately(args, file = nil, line = nil, src, ignore_stderr: nil, **o
414414
end
415415
assert(status.success?, FailDesc[status, "assert_separately failed", stderr])
416416
raise marshal_error if marshal_error
417+
assert(assertions > 0, "No assertions run in separated runner:#{res.inspect}", )
417418
end
418419

419420
# Run Ractor-related test without influencing the main test suite
@@ -444,6 +445,7 @@ def assert_ractor(src, args: [], require: nil, require_relative: nil, file: nil,
444445
Ractor.new {} # trigger initial warning
445446
$VERBOSE = previous_verbose
446447
#{src}
448+
assert(true)
447449
RUBY
448450
end
449451

0 commit comments

Comments
 (0)