diff options
| author | mansimarkaur | 2017-05-10 03:02:55 +0530 |
|---|---|---|
| committer | mansimarkaur | 2017-05-10 03:02:55 +0530 |
| commit | 45754a1888da5013e28e57acc3bcb92704039754 (patch) | |
| tree | 0fc3fa5578f591a7b2825feb4c7ee43ad1d6dbbc /Library | |
| parent | f1d4c4be78905be0d5fd83922ff1262ed92ba4e8 (diff) | |
| download | brew-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.rb | 2 |
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.") |
