Skip to content

Commit

Permalink
BUGFIX: use Minitest rather than deprecated MiniTest constant
Browse files Browse the repository at this point in the history
- Minitest 5.19.0 only loads the legacy compatibility layer if you have the MT_COMPAT environment variable set -- minitest/minitest@a2c6c18. This causes use of the MiniTest module name to fail, as well as the bundled older mocha. Fix our code to use the correct Minitest name, and update to a fixed mocha.
  • Loading branch information
faisal committed Sep 5, 2023
1 parent 82bcc56 commit 767549d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.8.1...main)

* [BUGFIX] Stop using long-deprecated MiniTest module name, removed in 5.19.0 (by [@faisal][])

# v4.8.1 / 2023-05-17 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.8.0...v4.8.1)

* [CHANGE] Update runtime dependencies to current versions of analysis gems (by [@faisal][])
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Provides runner methods used in the cucumber steps.
#
class RubyCriticWorld
extend MiniTest::Assertions
extend Minitest::Assertions
attr_accessor :assertions

def initialize
Expand Down
2 changes: 1 addition & 1 deletion rubycritic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'mdl', '~> 0.12.0'
spec.add_development_dependency 'minitest', '>= 5.3.0'
spec.add_development_dependency 'minitest-around', '~> 0.5.0', '>= 0.4.0'
spec.add_development_dependency 'mocha', '~> 2.0.2'
spec.add_development_dependency 'mocha', '~> 2.1.0'
spec.add_development_dependency 'rake', '~> 13.0.6', '>= 11.0.0'
spec.add_development_dependency 'rexml', '>= 3.2.0'
spec.add_development_dependency 'rubocop', '~> 1.51.0'
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def project_path
end
end

module MiniTest
module Minitest
module Assertions
##
# Fails unless <tt>exp</tt> and <tt>act</tt> are both arrays and
Expand All @@ -77,7 +77,7 @@ def assert_matched_arrays(exp, act)

module Expectations
##
# See MiniTest::Assertions#assert_matched_arrays
# See Minitest::Assertions#assert_matched_arrays
#
# [1,2,3].must_match_array [3,2,1]
#
Expand Down

0 comments on commit 767549d

Please sign in to comment.