diff --git a/test/test_worker_gem_independence.rb b/test/test_worker_gem_independence.rb index ff935856..c7875054 100644 --- a/test/test_worker_gem_independence.rb +++ b/test/test_worker_gem_independence.rb @@ -35,8 +35,11 @@ class TestWorkerGemIndependence < TestIntegration set_release_symlink File.expand_path(old_app_dir, __dir__) Dir.chdir(current_release_symlink) do - bundle_install - cli_server '--prune-bundler -w 1' + with_unbundled_env do + system("bundle config --local path vendor/bundle", out: File::NULL) + system("bundle install", out: File::NULL) + cli_server '--prune-bundler -w 1' + end end connection = connect @@ -45,7 +48,10 @@ class TestWorkerGemIndependence < TestIntegration set_release_symlink File.expand_path(new_app_dir, __dir__) Dir.chdir(current_release_symlink) do - bundle_install + with_unbundled_env do + system("bundle config --local path vendor/bundle", out: File::NULL) + system("bundle install", out: File::NULL) + end end start_phased_restart @@ -77,10 +83,4 @@ class TestWorkerGemIndependence < TestIntegration Bundler.with_unbundled_env { yield } end end - - def bundle_install - with_unbundled_env do - system("bundle install", out: File::NULL) - end - end end