diff --git a/test/helper.rb b/test/helper.rb
index <HASH>..<HASH> 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -26,7 +26,7 @@ class Rake::TestCase < Minitest::Test
     include Rake::TaskManager
   end
 
-  RUBY = Gem.ruby
+  RUBY = ENV['BUNDLE_RUBY'] || Gem.ruby
 
   def setup
     ARGV.clear
Support test-bundled-gems task on ruby core repository