summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-10-30 18:25:30 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-04 17:49:26 +0100
commit3a4b5d6b25ffc7699ac7f6c430a9c2f719bc429c (patch)
treecef1e4854953ad56e767d23194c686219a22268c
parent8587a5e8505ea36ab840afc6d47413e44522931e (diff)
downloadbundler-3a4b5d6b25ffc7699ac7f6c430a9c2f719bc429c.tar.gz
Simplify building some paths
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb4
-rw-r--r--spec/support/artifice/endpoint.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 3e6bc5abae..72ad06a43a 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -1043,7 +1043,7 @@ end
describe "when Bundler is bundled" do
it "doesn't blow up" do
install_gemfile <<-G
- gem "bundler", :path => "#{File.expand_path("..", lib)}"
+ gem "bundler", :path => "#{root}"
G
bundle %(exec ruby -e "require 'bundler'; Bundler.setup")
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index 66d81b3d0d..4aaf9d499c 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/runtime/with_unbundled_env_spec.rb
@@ -81,8 +81,8 @@ RSpec.describe "Bundler.with_env helpers" do
it "should restore RUBYLIB", :ruby_repo do
code = "print #{modified_env}['RUBYLIB']"
- ENV["RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo"
- ENV["BUNDLER_ORIG_RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo-original"
+ ENV["RUBYLIB"] = lib_dir.to_s + File::PATH_SEPARATOR + "/foo"
+ ENV["BUNDLER_ORIG_RUBYLIB"] = lib_dir.to_s + File::PATH_SEPARATOR + "/foo-original"
bundle_exec_ruby! code.dump
expect(last_command.stdboth).to include("/foo-original")
end
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 5ecb784a0a..bc2daf3edc 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require File.expand_path("../../path.rb", __FILE__)
-require Spec::Path.root.join("lib/bundler/deprecate")
+require Spec::Path.lib_dir.join("bundler/deprecate")
include Spec::Path
$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s))