Skip to content

Add dependency on minitest-mock for MT6 compatibility#137

Merged
voxik merged 1 commit intofedora-ruby:masterfrom
voxik:minitest6-compat
Jan 7, 2026
Merged

Add dependency on minitest-mock for MT6 compatibility#137
voxik merged 1 commit intofedora-ruby:masterfrom
voxik:minitest6-compat

Conversation

@voxik
Copy link
Member

@voxik voxik commented Jan 6, 2026

This prevents test errors with minitest 6+ such as:

   2) Error:
TestGem2Rpm#test_show_templates:
NoMethodError: undefined method 'stub' for class Gem2Rpm::Distro
    test/test_gem2rpm.rb:40:in 'TestGem2Rpm#test_show_templates'

This is due to minitest-mock being extracted from Minitest 6+:

minitest/minitest@de9aac1

Theoretically, the dependency could be conditionalized, but lets keep things simple.

@voxik voxik force-pushed the minitest6-compat branch from dd9dc9f to 6c69553 Compare January 6, 2026 18:19
@voxik
Copy link
Member Author

voxik commented Jan 6, 2026

Theoretically, the dependency could be conditionalized, but lets keep things simple.

And that is not possible unfortunately :/

@voxik voxik force-pushed the minitest6-compat branch 5 times, most recently from 3a739ac to b3dfe3f Compare January 7, 2026 14:14
This prevents test errors with minitest 6+ such as:

~~~
   2) Error:
TestGem2Rpm#test_show_templates:
NoMethodError: undefined method 'stub' for class Gem2Rpm::Distro
    test/test_gem2rpm.rb:40:in 'TestGem2Rpm#test_show_templates'
~~~

This is due to minitest-mock being extracted from Minitest 6+:

minitest/minitest@de9aac1

This change unfortunately requies Bundler to be used to execute test
suite, because:

1. RubyGems cannot load minitest-mock [[1]]
2. MT6 restrict support to Ruby 3.2+ [[2], [3]]

I wish the use of Bundler can be reverted one day.

[1]: ruby/rubygems#9238
[2]: minitest/minitest-mock#4
[3]: minitest/minitest#1058
@voxik voxik force-pushed the minitest6-compat branch from b3dfe3f to 44e345a Compare January 7, 2026 14:14
@voxik voxik merged commit a182f63 into fedora-ruby:master Jan 7, 2026
13 checks passed
@voxik voxik deleted the minitest6-compat branch January 7, 2026 14: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.

1 participant