Bug #35301
minitest raises deprecation warnings about global use
Description
In minitest 6 it will be invalid to use object.must_include(item)
. It should instead use _(object).must_include(item)
. This method name overlaps with `_()` from gettext. There is a hack to work around this, but it's also possible to call value()
or use assert_includes(collection, value)
. When using Rails 7 and Ruby 3.1 our hack no longer appears to work so the alternatives are better.
Associated revisions
History
#1
Updated by The Foreman Bot 8 months ago
- Assignee set to Ewoud Kohl van Wijngaarden
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9333 added
#2
Updated by The Foreman Bot 8 months ago
- Fixed in Releases 3.4.0 added
#3
Updated by Ewoud Kohl van Wijngaarden 8 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|b7afdcd0777d0898d55fb1c7a4f5611e2632be5d.
Fixes #35301 - minitest 5 deprecation fixes
This possibly overlaps with _() as a translation method. value() is also
an alias that can be used but using the assert* methods is more
consistent with the rest of the codebase