summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-05-09 18:14:40 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-05-09 18:14:40 -0500
commitda702da525174286947831d5f8ececbc01fdf5c6 (patch)
tree7226b36dbc2750e7a57cadaae2e4db54d57f0286 /spec
parentd085451947d41a0a3cdde3fd28723e11b842db7c (diff)
downloadbundler-da702da525174286947831d5f8ececbc01fdf5c6.tar.gz
[Mirror] Properly handle casing of file URIsseg-mirror-file-uri-case
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/settings_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb
index ec01827500..a93c41b7d2 100644
--- a/spec/bundler/settings_spec.rb
+++ b/spec/bundler/settings_spec.rb
@@ -184,6 +184,22 @@ that would suck --ehhh=oh geez it looks like i might have broken bundler somehow
it "is case insensitive" do
expect(settings.mirror_for("HTTPS://RUBYGEMS.ORG/")).to eq(mirror_uri)
end
+
+ context "with a file URI" do
+ let(:mirror_uri) { URI("file:/foo/BAR/baz/qUx/") }
+
+ it "returns the mirror URI" do
+ expect(settings.mirror_for(uri)).to eq(mirror_uri)
+ end
+
+ it "converts a string parameter to a URI" do
+ expect(settings.mirror_for("file:/foo/BAR/baz/qUx/")).to eq(mirror_uri)
+ end
+
+ it "normalizes the URI" do
+ expect(settings.mirror_for("file:/foo/BAR/baz/qUx")).to eq(mirror_uri)
+ end
+ end
end
end