summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/env_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/bundler/env_spec.rb')
-rw-r--r--spec/bundler/bundler/env_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/bundler/env_spec.rb b/spec/bundler/bundler/env_spec.rb
index 2cdead6eac..0dc19d1cf8 100644
--- a/spec/bundler/bundler/env_spec.rb
+++ b/spec/bundler/bundler/env_spec.rb
@@ -113,6 +113,20 @@ RSpec.describe Bundler::Env do
end
end
+ context "when there's bundler config with credentials" do
+ before do
+ bundle "config set https://localgemserver.test/ user:pass"
+ end
+
+ let(:output) { described_class.report(:print_gemfile => true) }
+
+ it "prints the config with redacted values" do
+ expect(output).to include("https://localgemserver.test")
+ expect(output).to include("user:[REDACTED]")
+ expect(output).to_not include("user:pass")
+ end
+ end
+
context "when Gemfile contains a gemspec and print_gemspecs is true" do
let(:gemspec) do
strip_whitespace(<<-GEMSPEC)