summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorColby Swandale <me@colby.fyi>2018-11-22 15:43:23 +1100
committerColby Swandale <me@colby.fyi>2018-11-25 07:56:11 +1100
commit93471b02962380f46271b832b5344760e532131d (patch)
tree9869089eabd58de2616cb8650da7080c789f62fe /spec
parentf160d15fe4e1cb25fad6a34ed9abd10b21f587f8 (diff)
downloadbundler-colby/git-https-default.tar.gz
add feature flag to use https for :git in the dslcolby/git-https-default
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/dsl_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index bffe4f1608..89528eb745 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -25,7 +25,23 @@ RSpec.describe Bundler::Dsl do
expect { subject.git_source(:example) }.to raise_error(Bundler::InvalidOption)
end
+ context "github_https feature flag" do
+ it "is true when github.https is true" do
+ bundle "config github.https true"
+ expect(Bundler.feature_flag.github_https?).to eq "true"
+ end
+ end
+
context "default hosts (git, gist)", :bundler => "< 2" do
+ context "when github.https config is true" do
+ before { bundle "config github.https true" }
+ it "converts :github to :git using https" do
+ 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
+ end
+
it "converts :github to :git" do
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "git://github.com/indirect/sparks.git"