aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support/rubygems_ext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/support/rubygems_ext.rb')
-rw-r--r--spec/bundler/support/rubygems_ext.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/bundler/support/rubygems_ext.rb b/spec/bundler/support/rubygems_ext.rb
index 2aaf072715..d13567d7af 100644
--- a/spec/bundler/support/rubygems_ext.rb
+++ b/spec/bundler/support/rubygems_ext.rb
@@ -2,7 +2,7 @@
require_relative "path"
-$LOAD_PATH.unshift(Spec::Path.lib_dir.to_s)
+$LOAD_PATH.unshift(Spec::Path.source_lib_dir.to_s)
module Spec
module Rubygems
@@ -59,7 +59,8 @@ module Spec
ENV["BUNDLE_PATH"] = nil
ENV["GEM_HOME"] = ENV["GEM_PATH"] = Path.base_system_gems.to_s
- ENV["PATH"] = [Path.bindir, Path.system_gem_path.join("bin"), ENV["PATH"]].join(File::PATH_SEPARATOR)
+ ENV["PATH"] = [Path.system_gem_path.join("bin"), ENV["PATH"]].join(File::PATH_SEPARATOR)
+ ENV["PATH"] = [Path.bindir, ENV["PATH"]].join(File::PATH_SEPARATOR) if Path.ruby_core?
end
def install_test_deps
@@ -103,16 +104,13 @@ module Spec
require "bundler"
definition = Bundler::Definition.build(gemfile, lockfile, nil)
definition.validate_runtime!
- Bundler::Installer.install(Path.root, definition, :path => ENV["GEM_HOME"])
+ Bundler::Installer.install(Path.source_root, definition, :path => ENV["GEM_HOME"])
ensure
ENV["BUNDLE_GEMFILE"] = old_gemfile
end
def test_gemfile
- gemfile = Path.root.join("test_gems.rb")
- # for Ruby core repository
- gemfile = Path.root.join("tool/bundler/test_gems.rb") unless File.exist?(gemfile)
- gemfile
+ Path.test_gemfile
end
def test_lockfile
@@ -120,7 +118,7 @@ module Spec
end
def dev_gemfile
- Path.root.join("dev_gems.rb")
+ Path.dev_gemfile
end
def dev_lockfile