Project

General

Profile

Bug #35301

minitest raises deprecation warnings about global use

Added by Ewoud Kohl van Wijngaarden 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

Revision b7afdcd0 (diff)
Added by Ewoud Kohl van Wijngaarden 8 months ago

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

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

Also available in: Atom PDF