summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-11-11 10:41:39 +0900
committernagachika <nagachika@ruby-lang.org>2021-11-22 10:51:35 +0900
commit24f911f474e11560af5fbd0f637f4c0ded23f604 (patch)
tree2f4d2fbdf6bc195012cbced0dac7d1463934cc67 /spec
parent31a71048521224774bdb8b5982ab73eb35dad66d (diff)
Merge RubyGems 3.2.28 and Bundler 2.2.28
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/newgem_spec.rb2
-rw-r--r--spec/bundler/commands/remove_spec.rb3
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb19
-rw-r--r--spec/bundler/support/builders.rb5
4 files changed, 27 insertions, 2 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 73ae721c69..a01d8b0aa8 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -450,7 +450,7 @@ RSpec.describe "bundle gem" do
bundle "gem #{gem_name}"
expect(generated_gemspec.metadata["allowed_push_host"]).
- to match(/mygemserver\.com/)
+ to match(/example\.com/)
end
it "sets a minimum ruby version" do
diff --git a/spec/bundler/commands/remove_spec.rb b/spec/bundler/commands/remove_spec.rb
index 170545f80c..9e2586bae6 100644
--- a/spec/bundler/commands/remove_spec.rb
+++ b/spec/bundler/commands/remove_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe "bundle remove" do
end
end
- context "when --install flag is specified" do
+ context "when --install flag is specified", :bundler => "< 3" do
it "removes gems from .bundle" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
@@ -40,6 +40,7 @@ RSpec.describe "bundle remove" do
bundle "remove rack"
expect(out).to include("rack was removed.")
+ expect(the_bundle).to_not include_gems "rack"
gemfile_should_be <<-G
source "#{file_uri_for(gem_repo1)}"
G
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index f97eefeef8..0262ef73c4 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -624,6 +624,25 @@ The :gist git source is deprecated, and will be removed in the future. Add this
end
end
+ context "bundle remove" do
+ before do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "rack"
+ G
+ end
+
+ context "with --install" do
+ it "shows a deprecation warning", :bundler => "< 3" do
+ bundle "remove rack --install"
+
+ expect(err).to include "[DEPRECATED] The `--install` flag has been deprecated. `bundle install` is triggered by default."
+ end
+
+ pending "fails with a helpful message", :bundler => "3"
+ end
+ end
+
context "bundle console" do
before do
bundle "console", :raise_on_error => false
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index 25377d2ac2..80e3d47b0b 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -35,6 +35,11 @@ module Spec
build_repo gem_repo1 do
FileUtils.cp rake_path, "#{gem_repo1}/gems/"
+ build_gem "coffee-script-source"
+ build_gem "git"
+ build_gem "puma"
+ build_gem "minitest"
+
build_gem "rack", %w[0.9.1 1.0.0] do |s|
s.executables = "rackup"
s.post_install_message = "Rack's post install message"