summaryrefslogtreecommitdiff
path: root/spec/bundler/install/gems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-15 21:31:12 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-22 20:32:30 +0900
commitc7ebeb7eda9f7f6bbb48effe1efc026eeb64d09c (patch)
treeb516b3b5119331d4d8431b4d17f552e2c8e798fe /spec/bundler/install/gems
parentf4f157fc81b940c0f76a01ee266a08e6bba69b6b (diff)
Sync Bundler PR #3624
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3114
Diffstat (limited to 'spec/bundler/install/gems')
-rw-r--r--spec/bundler/install/gems/compact_index_spec.rb4
-rw-r--r--spec/bundler/install/gems/dependency_api_spec.rb4
-rw-r--r--spec/bundler/install/gems/native_extensions_spec.rb2
-rw-r--r--spec/bundler/install/gems/standalone_spec.rb14
-rw-r--r--spec/bundler/install/gems/sudo_spec.rb2
5 files changed, 14 insertions, 12 deletions
diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb
index 2452d82667..4760d135e6 100644
--- a/spec/bundler/install/gems/compact_index_spec.rb
+++ b/spec/bundler/install/gems/compact_index_spec.rb
@@ -410,7 +410,7 @@ The checksum of /versions does not match the checksum provided by the server! So
api_request_limit = low_api_request_limit_for(gem_repo2)
- install_gemfile! <<-G, :artifice => "compact_index_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }
+ install_gemfile! <<-G, :artifice => "compact_index_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation)
source "#{source_uri}"
source "#{source_uri}/extra" do
gem "back_deps"
@@ -432,7 +432,7 @@ The checksum of /versions does not match the checksum provided by the server! So
api_request_limit = low_api_request_limit_for(gem_repo4)
- install_gemfile! <<-G, :artifice => "compact_index_extra_api_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }
+ install_gemfile! <<-G, :artifice => "compact_index_extra_api_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation)
source "#{source_uri}"
source "#{source_uri}/extra" do
gem "back_deps"
diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb
index 863966a0e1..d1af4d7ed7 100644
--- a/spec/bundler/install/gems/dependency_api_spec.rb
+++ b/spec/bundler/install/gems/dependency_api_spec.rb
@@ -384,7 +384,7 @@ RSpec.describe "gemcutter's dependency API" do
api_request_limit = low_api_request_limit_for(gem_repo2)
- install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }
+ install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation)
source "#{source_uri}"
source "#{source_uri}/extra"
gem "back_deps"
@@ -405,7 +405,7 @@ RSpec.describe "gemcutter's dependency API" do
api_request_limit = low_api_request_limit_for(gem_repo2)
- install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }
+ install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation)
source "#{source_uri}"
source "#{source_uri}/extra" do
gem "back_deps"
diff --git a/spec/bundler/install/gems/native_extensions_spec.rb b/spec/bundler/install/gems/native_extensions_spec.rb
index a057d0d152..dba0607bb4 100644
--- a/spec/bundler/install/gems/native_extensions_spec.rb
+++ b/spec/bundler/install/gems/native_extensions_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "installing a gem with native extensions", :ruby_repo do
+RSpec.describe "installing a gem with native extensions" do
it "installs" do
build_repo2 do
build_gem "c_extension" do |s|
diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb
index 521499a5df..2490227e13 100644
--- a/spec/bundler/install/gems/standalone_spec.rb
+++ b/spec/bundler/install/gems/standalone_spec.rb
@@ -21,7 +21,7 @@ RSpec.shared_examples "bundle install --standalone" do
testrb << "\nrequire \"#{k}\""
testrb << "\nputs #{k.upcase}"
end
- ruby testrb, :no_lib => true
+ ruby testrb
expect(out).to eq(expected_gems.values.join("\n"))
end
@@ -43,7 +43,7 @@ RSpec.shared_examples "bundle install --standalone" do
testrb << "\nrequire \"#{k}\""
testrb << "\nputs #{k.upcase}"
end
- ruby testrb, :no_lib => true, :dir => "#{bundled_app}2"
+ ruby testrb, :dir => "#{bundled_app}2"
expect(out).to eq(expected_gems.values.join("\n"))
end
@@ -68,7 +68,7 @@ RSpec.shared_examples "bundle install --standalone" do
include_examples "common functionality"
end
- describe "with gems with native extension", :ruby_repo do
+ describe "with gems with native extension" do
before do
install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
source "#{file_uri_for(gem_repo1)}"
@@ -165,7 +165,7 @@ RSpec.shared_examples "bundle install --standalone" do
it "allows creating a standalone file with limited groups" do
bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => "default", :dir => cwd)
- load_error_ruby <<-RUBY, "spec", :no_lib => true
+ load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
require "bundler/setup"
@@ -181,7 +181,7 @@ RSpec.shared_examples "bundle install --standalone" do
it "allows --without to limit the groups used in a standalone" do
bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle"), :without => "test").merge(:standalone => true, :dir => cwd)
- load_error_ruby <<-RUBY, "spec", :no_lib => true
+ load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
require "bundler/setup"
@@ -197,7 +197,7 @@ RSpec.shared_examples "bundle install --standalone" do
it "allows --path to change the location of the standalone bundle" do
bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true, :dir => cwd)
- ruby <<-RUBY, :no_lib => true
+ ruby <<-RUBY
$:.unshift File.expand_path("path/to/bundle")
require "bundler/setup"
@@ -212,7 +212,7 @@ RSpec.shared_examples "bundle install --standalone" do
bundle! :install, forgotten_command_line_options(:without => "test").merge(:dir => cwd)
bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
- load_error_ruby <<-RUBY, "spec", :no_lib => true
+ load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
require "bundler/setup"
diff --git a/spec/bundler/install/gems/sudo_spec.rb b/spec/bundler/install/gems/sudo_spec.rb
index 3e4c1ad1c1..bab8412170 100644
--- a/spec/bundler/install/gems/sudo_spec.rb
+++ b/spec/bundler/install/gems/sudo_spec.rb
@@ -145,6 +145,8 @@ RSpec.describe "when using sudo", :sudo => true do
sudo "mkdir -p #{gem_home}"
sudo "chmod ugo-w #{gem_home}"
+ system_gems :bundler, :path => gem_home
+
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack", '1.0'