Skip to content

Skip teardown when setup could not create the test key - #18

Merged
hsbt merged 1 commit into
masterfrom
claude/happy-chatterjee-9067e8
Oct 5, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/happy-chatterjee-9067e8

Conversation

@hsbt

@hsbt hsbt commented Oct 5, 2026

Copy link
Copy Markdown
Member

When setup in test/win32/test_registry.rb cannot create its test key, teardown still calls delete_key(nil) and adds NoMethodError: undefined method 'chomp' for nil to every test. I hit this running make test-bundled-gems at Low integrity, where HKCU writes are denied. The 17 tests reported 34 errors instead of 17. The omit path, where no unused key is found, shows the same extra error.

This makes teardown return early when no key was created, so only the original cause is reported. Normal runs are unchanged.

Generated with Claude Code

When setup fails, for example without write access to HKCU at Low integrity, or omits because no unused key is found, teardown passed nil to delete_key and reported a NoMethodError on top of the real cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit b92906c into master Oct 5, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant