Use bundler for test gem dependencies.

Closes #31986.
References #31981.