summaryrefslogtreecommitdiff
path: root/spec/install
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-09-07 20:22:24 +0200
committerSamuel Giddins <segiddins@segiddins.me>2016-09-07 20:22:24 +0200
commit609f758a73fde232ba831cb5c32671a1c554e4d4 (patch)
tree0dff2043af174779f901340ef877fc402e4f7fb8 /spec/install
parent4818f415d07e547533f48d3f6c59dfda2b73c3fd (diff)
downloadbundler-609f758a73fde232ba831cb5c32671a1c554e4d4.tar.gz
Fail gracefully when attempting to request from an unknown URI schemeseg-fail-invalid-uri-schemes
Diffstat (limited to 'spec/install')
-rw-r--r--spec/install/gems/compact_index_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index a800a6ad7b..228d8ddcc9 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/install/gems/compact_index_spec.rb
@@ -696,6 +696,17 @@ The checksum of /versions does not match the checksum provided by the server! So
expect(the_bundle).to include_gems "rack 1.0.0"
end
+ it "fails gracefully when the source URI has an invalid scheme" do
+ install_gemfile <<-G
+ source "htps://rubygems.org"
+ gem "rack"
+ G
+ expect(exitstatus).to eq(15) if exitstatus
+ expect(out).to end_with(<<-E.strip)
+ The request uri `htps://index.rubygems.org/versions` has an invalid scheme (`htps`). Did you mean `http` or `https`?
+ E
+ end
+
describe "checksum validation", :rubygems => ">= 2.3.0" do
it "raises when the checksum does not match" do
install_gemfile <<-G, :artifice => "compact_index_wrong_gem_checksum"