From Docs
rspec-mocks provides two methods,
allow_any_instance_ofandexpect_any_instance_of, that will allow you to stub or mock any instance of a class. They are used in place of allow or expect:
allow_any_instance_of(Widget).to receive(:name).and_return("Wibble")
Is there something close to this feature to mock method for all instances of class with Minitest?