Add Ruby 4 to tests and stop using minitest/mock for stub
#697
+20
−11
minitest/mock for stub
#697