aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authormansimarkaur2017-05-10 03:02:55 +0530
committermansimarkaur2017-05-10 03:02:55 +0530
commit45754a1888da5013e28e57acc3bcb92704039754 (patch)
tree0fc3fa5578f591a7b2825feb4c7ee43ad1d6dbbc /Library
parentf1d4c4be78905be0d5fd83922ff1262ed92ba4e8 (diff)
downloadbrew-45754a1888da5013e28e57acc3bcb92704039754.tar.bz2
diagnostic_spec.rb: check_access_lock_dir test
Added assertion to check `HOMEBREW_LOCK_DIR.stat.mode` changes after `HOMEBREW_LOCK_DIR.chmod 0555`
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/diagnostic_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/test/diagnostic_spec.rb b/Library/Homebrew/test/diagnostic_spec.rb
index 6e2c09268..12a8e0c42 100644
--- a/Library/Homebrew/test/diagnostic_spec.rb
+++ b/Library/Homebrew/test/diagnostic_spec.rb
@@ -43,8 +43,10 @@ describe Homebrew::Diagnostic::Checks do
specify "#check_access_lock_dir" do
begin
+ prev_mode = HOMEBREW_LOCK_DIR.stat.mode
mode = HOMEBREW_LOCK_DIR.stat.mode & 0777
HOMEBREW_LOCK_DIR.chmod 0555
+ expect(HOMEBREW_LOCK_DIR.stat.mode).not_to eq(prev_mode)
expect(subject.check_access_lock_dir)
.to match("#{HOMEBREW_LOCK_DIR} isn't writable.")