Fix tests broken in https://github.com/rails/rails/pull/16149
Merge pull request #16150 from sferik/fix-tests

Fix tests broken in #16149