summaryrefslogtreecommitdiff
path: root/spec/bundler/other
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-04 13:10:58 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-04 13:10:58 +0000
commite97741e12a22d78825a3a9dfcb7382adb0e27855 (patch)
tree5344cb31a89df6fd5fbae92740d4229d655eee8f /spec/bundler/other
parent4bbbbb6a3f5bd242f740041a644311f97c4a0052 (diff)
Merge Bundler 2.0.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/other')
-rw-r--r--spec/bundler/other/bundle_ruby_spec.rb2
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb20
-rw-r--r--spec/bundler/other/platform_spec.rb12
3 files changed, 17 insertions, 17 deletions
diff --git a/spec/bundler/other/bundle_ruby_spec.rb b/spec/bundler/other/bundle_ruby_spec.rb
index a7da9cbec9..fbca31d0a0 100644
--- a/spec/bundler/other/bundle_ruby_spec.rb
+++ b/spec/bundler/other/bundle_ruby_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle_ruby", :bundler => "< 2" do
+RSpec.describe "bundle_ruby", :bundler => "< 3" do
context "without patchlevel" do
it "returns the ruby version" do
gemfile <<-G
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index fba177b497..50800dbb0c 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "major deprecations", :bundler => "< 2" do
+RSpec.describe "major deprecations", :bundler => "< 3" do
let(:warnings) { last_command.bundler_err } # change to err in 2.0
let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby(gems)? >= .*/, "") }
@@ -200,25 +200,25 @@ RSpec.describe "major deprecations", :bundler => "< 2" do
context "with github gems" do
it "warns about the https change" do
msg = <<-EOS
-The :github git source is deprecated, and will be removed in Bundler 2.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work:
+The :github git source is deprecated, and will be removed in Bundler 3.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work:
git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" }
EOS
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg)
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("sparks", :github => "indirect/sparks")
end
it "upgrades to https on request" do
Bundler.settings.temporary "github.https" => true
msg = <<-EOS
-The :github git source is deprecated, and will be removed in Bundler 2.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work:
+The :github git source is deprecated, and will be removed in Bundler 3.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work:
git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" }
EOS
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg)
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "The `github.https` setting will be removed")
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, "The `github.https` setting will be removed")
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "https://github.com/indirect/sparks.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)
@@ -229,7 +229,7 @@ The :github git source is deprecated, and will be removed in Bundler 2.0. Change
it "warns about removal" do
allow(Bundler.ui).to receive(:deprecate)
msg = <<-EOS
-The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add this code to the top of your Gemfile to ensure it continues to work:
+The :bitbucket git source is deprecated, and will be removed in Bundler 3.0. Add this code to the top of your Gemfile to ensure it continues to work:
git_source(:bitbucket) do |repo_name|
user_name, repo_name = repo_name.split("/")
@@ -238,7 +238,7 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add
end
EOS
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg)
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("not-really-a-gem", :bitbucket => "mcorp/flatlab-rails")
end
end
@@ -247,10 +247,10 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add
it "warns about removal" do
allow(Bundler.ui).to receive(:deprecate)
msg = "The :gist git source is deprecated, and will be removed " \
- "in Bundler 2.0. Add this code to the top of your Gemfile to ensure it " \
+ "in Bundler 3.0. Add this code to the top of your Gemfile to ensure it " \
"continues to work:\n\n git_source(:gist) {|repo_name| " \
"\"https://gist.github.com/\#{repo_name}.git\" }\n\n"
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg)
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("not-really-a-gem", :gist => "1234")
end
end
diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/other/platform_spec.rb
index ca74945563..6c59fd893c 100644
--- a/spec/bundler/other/platform_spec.rb
+++ b/spec/bundler/other/platform_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe "bundle platform" do
context "without flags" do
let(:bundle_platform_platforms_string) do
platforms = [rb]
- platforms.unshift(specific_local_platform) if Bundler.feature_flag.bundler_2_mode?
+ platforms.unshift(specific_local_platform) if Bundler.feature_flag.bundler_3_mode?
platforms.map {|pl| "* #{pl}" }.join("\n")
end
@@ -633,7 +633,7 @@ G
end
end
- it "fails if ruby version doesn't match", :bundler => "< 2" do
+ it "fails if ruby version doesn't match", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rails"
@@ -645,7 +645,7 @@ G
should_be_ruby_version_incorrect
end
- it "fails if engine doesn't match", :bundler => "< 2" do
+ it "fails if engine doesn't match", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rails"
@@ -657,7 +657,7 @@ G
should_be_engine_incorrect
end
- it "fails if engine version doesn't match", :bundler => "< 2" do
+ it "fails if engine version doesn't match", :bundler => "< 3" do
simulate_ruby_engine "jruby" do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -671,7 +671,7 @@ G
end
end
- it "fails when patchlevel doesn't match", :bundler => "< 2" do
+ it "fails when patchlevel doesn't match", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
@@ -928,7 +928,7 @@ G
end
end
- context "bundle console", :bundler => "< 2" do
+ context "bundle console", :bundler => "< 3" do
before do
install_gemfile <<-G
source "file://#{gem_repo1}"