From 9c4c1e04f57d7c6dcfc1dd82f1a9649afc609d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 5 Mar 2020 12:55:56 +0100 Subject: Remove unnecessary `:keep_path` parameter --- spec/commands/exec_spec.rb | 2 +- spec/install/gemfile/gemspec_spec.rb | 2 +- spec/support/builders.rb | 4 ++-- spec/support/helpers.rb | 5 ----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 1032f10d18..5123c20206 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -929,7 +929,7 @@ __FILE__: #{path.to_s.inspect} context "with a git gem that includes extensions" do before do - system_gems :bundler, :keep_path => true + system_gems :bundler build_git "simple_git_binary", &:add_c_extension bundle! "config set path .bundle" install_gemfile! <<-G, :system_bundler => true diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb index fcda3004f5..90e25571e2 100644 --- a/spec/install/gemfile/gemspec_spec.rb +++ b/spec/install/gemfile/gemspec_spec.rb @@ -175,7 +175,7 @@ RSpec.describe "bundle install from an existing gemspec" do s.add_dependency "platform_specific" end - system_gems "platform_specific-1.0-java", :path => :bundle_path, :keep_path => true + system_gems "platform_specific-1.0-java", :path => :bundle_path install_gemfile! <<-G gemspec :path => '#{tmp.join("foo")}' diff --git a/spec/support/builders.rb b/spec/support/builders.rb index ac56216a85..a78219707e 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -763,9 +763,9 @@ module Spec gem_path = File.expand_path("#{@spec.full_name}.gem", lib_path) if opts[:to_system] - @context.system_gems gem_path, :keep_path => true + @context.system_gems gem_path elsif opts[:to_bundle] - @context.system_gems gem_path, :path => :bundle_path, :keep_path => true + @context.system_gems gem_path, :path => :bundle_path else FileUtils.mv(gem_path, destination) end diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index dde8daaf6f..e556292774 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -374,11 +374,6 @@ module Spec end gems = gems.flatten - unless opts[:keep_path] - FileUtils.rm_rf(path) - FileUtils.mkdir_p(path) - end - Gem.clear_paths env_backup = ENV.to_hash -- cgit v1.2.1