After years, I have finally managed to update shoulda and
shoulda-matchers. Unfortunately, shoulda-matchers is heavily patched for
Rails 5.2 support. Nevertheless, there are sill some deprecation
warnings remaining. I have tested things which depends on Shoulda and
they seems to be just fine, so hopefully nothing is really broken.