summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/source/git/git_proxy_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/bundler/source/git/git_proxy_spec.rb')
-rw-r--r--spec/bundler/bundler/source/git/git_proxy_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/bundler/bundler/source/git/git_proxy_spec.rb b/spec/bundler/bundler/source/git/git_proxy_spec.rb
index 34fe21e9fb..d282a449a5 100644
--- a/spec/bundler/bundler/source/git/git_proxy_spec.rb
+++ b/spec/bundler/bundler/source/git/git_proxy_spec.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
-require "spec_helper"
RSpec.describe Bundler::Source::Git::GitProxy do
let(:uri) { "https://github.com/bundler/bundler.git" }
@@ -7,25 +6,25 @@ RSpec.describe Bundler::Source::Git::GitProxy do
context "with configured credentials" do
it "adds username and password to URI" do
- Bundler.settings[uri] = "u:p"
+ Bundler.settings.temporary(uri => "u:p")
expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/bundler/bundler.git"))
subject.checkout
end
it "adds username and password to URI for host" do
- Bundler.settings["github.com"] = "u:p"
+ 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
end
it "does not add username and password to mismatched URI" do
- Bundler.settings["https://u:p@github.com/bundler/bundler-mismatch.git"] = "u:p"
+ 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
end
it "keeps original userinfo" do
- Bundler.settings["github.com"] = "u:p"
+ 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))