Skip to content

Fix hash expectations for minitest 6.1 - #96

Merged
kvz merged 3 commits into
mainfrom
minitest-hashes
Nov 12, 2026
Merged

kvz merged 3 commits into
mainfrom
minitest-hashes

Conversation

@kvz

@kvz kvz commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Minitest 6.1.0 treats bare hashes passed to must_equal as keyword arguments, causing 13 existing behavior tests to fail before comparing the expected value. Give those expected hashes explicit braces so the same assertions work with minitest 5 and 6. Library code and dependency requirements are unchanged.

Ruby 3.1 also needs Ubuntu 24.04: the first CI run failed during Ruby setup after ubuntu-latest moved to 26.04. Use 24.04 for the supported Ruby matrix on x64 and arm64. This runner configuration is validated by CI rather than a source-text test.

The expanded matrix also exposed an existing order-dependent warning assertion: MultiJson deprecations can appear alongside the SDK's rate-limit warning when this test runs first. Require the exact warning line exactly once among stderr lines. Seed 13766 reproduces the failure before this assertion change and passes afterward.

Validation:

  • Before the hash fix: Ruby 4.0.7 / minitest 6.1.0 reports 13 failures in existing SDK behavior tests.
  • Ruby 3.1.0 (the gemspec minimum): 140 tests / 354 assertions pass with both the currently resolved minitest 5 and, separately, minitest 5.15.0 bundled with Ruby 3.1, using seed 13766.
  • Ruby 4.0.7 / minitest 6.1.0 with Node signature parity and coverage enabled: 140 tests / 364 assertions pass with seed 13766; only the optional live upload is skipped locally.
  • Native arm64 Ruby 4.0.9 / minitest 6.1.0: 140 tests / 354 assertions pass with seed 13766.
  • bundle exec standardrb passes on Ruby 3.1 and 4.0 (x64), and Ruby 4.0 (arm64). git diff --check and actionlint pass.
  • Final CI: all ten Ruby 3.1–4.0 jobs on x64 and arm64, plus the live upload integration test, pass.

Council review: six rounds. Rounds 1–3 were clean; round 4 requested retaining duplicate-warning detection, so the warning assertion now counts exactly one matching line. Rounds 5 and 6 reviewed the full final diff and were consecutive clean rounds. The existing public API test demonstrates the warning and retry behavior; no test of the assertion itself was added.

Publishing is manual; merging does not publish to RubyGems.

Closes #95

🤖 Claimed by kvz on framework1/ruby-sdk since 2026-11-12 · resume: codex resume 01a1cf95-44cc-7a03-a63d-fb007674476e

@kvz kvz self-assigned this Nov 12, 2026
@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.89%. Comparing base (0a5a7f1) to head (2535b43).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   98.89%   98.89%           
=======================================
  Files           9        9           
  Lines         363      363           
  Branches       46       46           
=======================================
  Hits          359      359           
  Misses          1        1           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kvz
kvz marked this pull request as ready for review November 12, 2026 12:13
@kvz
kvz requested a review from tim-kos November 12, 2026 12:13
@kvz
kvz merged commit 13bb306 into main Nov 12, 2026
11 checks passed
@kvz
kvz deleted the minitest-hashes branch November 12, 2026 13:16
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.

Unit tests fail with minitest 6.1.0 (bare hash passed to must_equal)

2 participants