diff options
Diffstat (limited to 'spec/bundler/settings_spec.rb')
-rw-r--r-- | spec/bundler/settings_spec.rb | 16 |
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 |