summaryrefslogtreecommitdiff
path: root/spec/other
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-24 11:23:58 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-24 15:52:50 +0200
commit26d3a59f61b72d44973f14630c2d889b4ca00a71 (patch)
tree231561a6adb43a5a6f816d5f8b7e8fb7ce5446c9 /spec/other
parentec8f98574a90de1e87a50e00141180d761f161dc (diff)
downloadbundler-https_sources.tar.gz
Fully switch to https sourceshttps_sources
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/major_deprecation_spec.rb32
1 files changed, 14 insertions, 18 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 83944e4075..53bc4b0b79 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -365,38 +365,30 @@ RSpec.describe "major deprecations" do
end
describe Bundler::Dsl do
- let(:msg) do
- <<-EOS
-The :github git source is deprecated, and will be removed in the future. 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
- end
-
before do
@rubygems = double("rubygems")
allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems }
end
context "with github gems" do
- it "warns about the https change if people are opting out" do
- Bundler.settings.temporary "github.https" => false
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "Setting `github.https` to false is deprecated and won't be supported in the future.")
- subject.gem("sparks", :github => "indirect/sparks")
- end
+ it "warns about removal", :bundler => "2" do
+ msg = <<-EOS
+The :github git source is deprecated, and will be removed in the future. 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" }
- it "upgrades to https by default", :bundler => "2" do
+ EOS
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "https://github.com/indirect/sparks.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)
end
+
+ pending "should fail with a helpful error", :bundler => "3"
end
context "with bitbucket gems" do
- it "warns about removal" do
+ it "warns about removal", :bundler => "2" do
allow(Bundler.ui).to receive(:deprecate)
msg = <<-EOS
The :bitbucket git source is deprecated, and will be removed in the future. Add this code to the top of your Gemfile to ensure it continues to work:
@@ -411,10 +403,12 @@ The :bitbucket git source is deprecated, and will be removed in the future. Add
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("not-really-a-gem", :bitbucket => "mcorp/flatlab-rails")
end
+
+ pending "should fail with a helpful error", :bundler => "3"
end
context "with gist gems" do
- it "warns about removal" do
+ it "warns about removal", :bundler => "2" do
allow(Bundler.ui).to receive(:deprecate)
msg = <<-EOS
The :gist git source is deprecated, and will be removed in the future. Add this code to the top of your Gemfile to ensure it continues to work:
@@ -425,6 +419,8 @@ The :gist git source is deprecated, and will be removed in the future. Add this
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("not-really-a-gem", :gist => "1234")
end
+
+ pending "should fail with a helpful error", :bundler => "3"
end
end