Upgrading to gems derived from Rails 7 causes Minitest errors #55
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
help wanted
Extra attention is needed
Background
While upgrading gems derived from Rails to address security vulnerabilities in #54, a series of spec errors prevented a normal
bundle update
. There was not an obvious fix to make the specs work on Rails 7, so I opted to force Rails 6 to resolve the security alerts. Please see "Technical Details" for more information.Proposed
Upgrade all Rails-derived gems to version 7.x and fix any errors such that the test suite passes.
Technical Details
Using
bundle update
brought the Rails-derived gems to version 7.1.1 but this introduced unexpected spec failures, likely due to a dependency issue relating to theassert
method. Both failing specs useperform_enqueued_jobs
.Debugging Notes
The following are my debugging notes in the hopes that they're useful to anyone working on this issue.
Details...
When running
rake
, the following specs failed:It appears that Minitest may have been a "soft" dependency of
ActiveJob::TestHelper
orActiveSupport::Testing::Assertions
, asassert
is referred to but never defined. Manually requiringminitest
and addingconfig.include Minitest::Assertions
partially resolves the error, but causes another:I manually defined a
tagged_logger
:...but that revealed even more errors:
I stopped and instead manually defined
assert
:This caused the specs to pass, which resolved my concern about Rails 7.x support. However, it doesn't explain the root cause, so I opted to force Rails 6.x in fe9ffa5.
See also
Related to: #17
The text was updated successfully, but these errors were encountered: