summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/source/git
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
commit68ddd4d300e9a88737c4f37af74e1a0312949b2f (patch)
tree787e1e83d76934ce039eb336995a8d5bb53a89e6 /spec/bundler/bundler/source/git
parentd636809c057432e8d42abe30c6c6785eb0721d77 (diff)
Merge Bundler 2.1.0.pre.1 as developed version from upstream.
https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/bundler/source/git')
-rw-r--r--spec/bundler/bundler/source/git/git_proxy_spec.rb32
1 files changed, 18 insertions, 14 deletions
diff --git a/spec/bundler/bundler/source/git/git_proxy_spec.rb b/spec/bundler/bundler/source/git/git_proxy_spec.rb
index 3a29c97461..016105ccde 100644
--- a/spec/bundler/bundler/source/git/git_proxy_spec.rb
+++ b/spec/bundler/bundler/source/git/git_proxy_spec.rb
@@ -10,29 +10,33 @@ RSpec.describe Bundler::Source::Git::GitProxy do
context "with configured credentials" do
it "adds username and password to URI" do
- Bundler.settings.temporary(uri => "u:p")
- expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/bundler/bundler.git"))
- subject.checkout
+ Bundler.settings.temporary(uri => "u:p") do
+ expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/bundler/bundler.git"))
+ subject.checkout
+ end
end
it "adds username and password to URI for host" do
- Bundler.settings.temporary("github.com" => "u:p")
- expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/bundler/bundler.git"))
- subject.checkout
+ Bundler.settings.temporary("github.com" => "u:p") do
+ expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/bundler/bundler.git"))
+ subject.checkout
+ end
end
it "does not add username and password to mismatched URI" do
- Bundler.settings.temporary("https://u:p@github.com/bundler/bundler-mismatch.git" => "u:p")
- expect(subject).to receive(:git_retry).with(match(uri))
- subject.checkout
+ Bundler.settings.temporary("https://u:p@github.com/bundler/bundler-mismatch.git" => "u:p") do
+ expect(subject).to receive(:git_retry).with(match(uri))
+ subject.checkout
+ end
end
it "keeps original userinfo" do
- Bundler.settings.temporary("github.com" => "u:p")
- original = "https://orig:info@github.com/bundler/bundler.git"
- subject = described_class.new(Pathname("path"), original, "HEAD")
- expect(subject).to receive(:git_retry).with(match(original))
- subject.checkout
+ Bundler.settings.temporary("github.com" => "u:p") do
+ original = "https://orig:info@github.com/bundler/bundler.git"
+ subject = described_class.new(Pathname("path"), original, "HEAD")
+ expect(subject).to receive(:git_retry).with(match(original))
+ subject.checkout
+ end
end
end