Commit b2dd1a8
fix: use Minitest.after_run for report summary, not at_exit
Root cause: at_exit hooks run in LIFO order. Our at_exit was registered
after minitest's autorun, so it fired before tests finished — reporter
had total=0 because no assertions had been processed yet.
Fix: Use Minitest.after_run (runs after all tests complete) when
minitest is available, falling back to at_exit for RSpec/Cucumber.
Also remove screenshots&.clear from verify_screenshots! ensure block —
clearing now happens in registry.reset after notify_reporters, so
assertions are available for the reporter before being cleared.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d7153ab commit b2dd1a8
2 files changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
0 commit comments