summaryrefslogtreecommitdiff
path: root/spec/commands/install_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/install_spec.rb')
-rw-r--r--spec/commands/install_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index 9c81457068..e48d5009ae 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -459,4 +459,20 @@ describe "bundle install with gem sources" do
expect(out).to include("grant write permissions")
end
end
+
+ describe "when bundle install is executed with unencoded authentication" do
+ before do
+ gemfile <<-G
+ source 'https://rubygems.org/'
+ gem 'bundler'
+ G
+ end
+
+ it "should display a helpful messag explaining how to fix it" do
+ bundle :install, :env => { "BUNDLE_RUBYGEMS__ORG" => "user:pass{word" }
+ expect(exitstatus).to eq(17) if exitstatus
+ expect(out).to eq("Please CGI escape your usernames and passwords before " \
+ "setting them for authentication.")
+ end
+ end
end