summaryrefslogtreecommitdiff
path: root/spec/commands
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-04-12 20:20:03 +1000
committerColby Swandale <colby@taplaboratories.com>2017-04-12 20:20:03 +1000
commitb6c30144033a36c116525550ae3e13637b30f021 (patch)
treee75048286135a2e696cae37dce57ab693e02320e /spec/commands
parent3a76965b54e6ffc7d8325241ec75204dcf5732b0 (diff)
downloadbundler-b6c30144033a36c116525550ae3e13637b30f021.tar.gz
print old config value in parseable format using overwriting an existing
value
Diffstat (limited to 'spec/commands')
-rw-r--r--spec/commands/config_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index 4ce323c3a9..030a85ff62 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -142,6 +142,16 @@ RSpec.describe ".bundle/config" do
run "puts Bundler.settings['foo']"
expect(out).to eq("value")
end
+
+ context "when replacing a current value with the parseable flag" do
+ before { bundle "config --global foo value" }
+ it "prints the current value in a parseable format" do
+ bundle "config --global --parseable foo value2"
+ expect(out).to eq "foo=value"
+ run "puts Bundler.settings['foo']"
+ expect(out).to eq("value2")
+ end
+ end
end
describe "local" do
@@ -191,6 +201,7 @@ RSpec.describe ".bundle/config" do
it "can be deleted with parseable option" do
bundle "config --local foo value"
bundle "config --delete --parseable foo"
+ expect(out).to eq ""
run "puts Bundler.settings['foo'] == nil"
expect(out).to eq("true")
end