summaryrefslogtreecommitdiff
path: root/spec/runtime/setup_spec.rb
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-11-01 21:49:41 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-11-01 22:02:59 +0900
commit09bfdfa31ad5ae34d29745344493f6a63d355804 (patch)
tree9c533bb34d9fa5ea818c13e9422efee9757e1b9d /spec/runtime/setup_spec.rb
parent6d2c0d2a199564a75612eb492adec5e27eaa923d (diff)
downloadbundler-09bfdfa31ad5ae34d29745344493f6a63d355804.tar.gz
Backport from ruby core
Diffstat (limited to 'spec/runtime/setup_spec.rb')
-rw-r--r--spec/runtime/setup_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 376053a625..abe9979109 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -144,7 +144,7 @@ RSpec.describe "Bundler.setup" do
expect(rack_load_order).to be > 0
end
- it "orders the load path correctly when there are dependencies", :ruby_repo do
+ it "orders the load path correctly when there are dependencies" do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rails"
@@ -860,7 +860,7 @@ end
context "with bundler is located in symlinked GEM_HOME" do
let(:gem_home) { Dir.mktmpdir }
let(:symlinked_gem_home) { Tempfile.new("gem_home").path }
- let(:bundler_dir) { File.expand_path("../../..", __FILE__) }
+ let(:bundler_dir) { ruby_core? ? File.expand_path("../../../..", __FILE__) : File.expand_path("../../..", __FILE__) }
let(:bundler_lib) { File.join(bundler_dir, "lib") }
before do
@@ -872,7 +872,8 @@ end
FileUtils.ln_s(bundler_dir, File.join(gems_dir, "bundler-#{Bundler::VERSION}"))
- gemspec = File.read("#{bundler_dir}/bundler.gemspec").
+ gemspec_file = ruby_core? ? "#{bundler_dir}/lib/bundler.gemspec" : "#{bundler_dir}/bundler.gemspec"
+ gemspec = File.read(gemmspec_file).
sub("Bundler::VERSION", %("#{Bundler::VERSION}"))
gemspec = gemspec.lines.reject {|line| line =~ %r{lib/bundler/version} }.join
@@ -881,7 +882,7 @@ end
end
end
- it "should successfully require 'bundler/setup'" do
+ it "should successfully require 'bundler/setup'", :ruby_repo do
install_gemfile ""
ruby <<-'R', :env => { "GEM_PATH" => symlinked_gem_home }, :no_lib => true
@@ -1265,7 +1266,7 @@ end
expect(out).to eq("undefined\nconstant")
end
- describe "default gem activation", :ruby_repo do
+ describe "default gem activation" do
let(:exemptions) do
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("2.7") || ENV["RGV"] == "master"
[]