summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanitoFatas <katehuang0320@gmail.com>2016-08-31 15:35:57 +0800
committerJuanitoFatas <katehuang0320@gmail.com>2016-08-31 15:38:05 +0800
commit19b5759cff213e80192368685f8c0332c3003cdc (patch)
tree2a0f5865113abbd4bbbe4d9195e4a41493ffdad1
parent55c51ceec1f04a6175489803cb975c2c66fbee0c (diff)
downloadbundler-19b5759cff213e80192368685f8c0332c3003cdc.tar.gz
Add a spec for Bundler::Settings#temporary
-rw-r--r--spec/bundler/settings_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb
index 0f7d2a0138..31ca13903c 100644
--- a/spec/bundler/settings_spec.rb
+++ b/spec/bundler/settings_spec.rb
@@ -96,6 +96,18 @@ that would suck --ehhh=oh geez it looks like i might have broken bundler somehow
end
end
+ describe "#temporary" do
+ it "reset after used" do
+ Bundler.settings[:no_install] = true
+
+ Bundler.settings.temporary(:no_install => false) do
+ expect(Bundler.settings[:no_install]).to eq false
+ end
+
+ expect(Bundler.settings[:no_install]).to eq true
+ end
+ end
+
describe "#set_global" do
context "when it's not possible to write to the file" do
it "raises an PermissionError with explanation" do