Skip to content

Comments

Fix test failures on Ruby 3.3+#181

Closed
sokolikp wants to merge 1 commit intopremailer:masterfrom
sokolikp:fix/test-failures-ruby-33
Closed

Fix test failures on Ruby 3.3+#181
sokolikp wants to merge 1 commit intopremailer:masterfrom
sokolikp:fix/test-failures-ruby-33

Conversation

@sokolikp
Copy link
Contributor

Fixes two pre-existing test failures on Ruby 3.3+:

  1. NoMethodError: undefined method 'stub' for class ValueClass.stub(:new, ...) no longer works in Ruby 3.3+. Replaced with define_singleton_method to temporarily override Value.new.

  2. NameError: uninitialized constant Minitest::Mockminitest/mock was never required in the test helper.

These failures affect the test._3_3 CI matrix entry and cause subsequent matrix entries to be cancelled.

- Add missing require 'minitest/mock' for Minitest::Mock usage in
  test_declarations.rb
- Replace Value.stub(:new, ...) with define_singleton_method approach
  since Class.stub no longer works in Ruby 3.3+

Amp-Thread-ID: https://ampcode.com/threads/T-019c8b1f-829d-70cd-83c5-3409a635e616
Co-authored-by: Amp <amp@ampcode.com>
@grosser
Copy link
Contributor

grosser commented Feb 23, 2026

thx, fixed as part of #182

@grosser grosser closed this Feb 23, 2026
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.

2 participants