Skip to content

Commit 459fef3

Browse files
authored
Merge pull request #2615 from mansimarkaur/stat.mode_change_assertion
diagnostic_spec.rb: assertion in check_access_lock_dir test
2 parents fa1e238 + 45754a1 commit 459fef3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Library/Homebrew/test/diagnostic_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@
4343

4444
specify "#check_access_lock_dir" do
4545
begin
46+
prev_mode = HOMEBREW_LOCK_DIR.stat.mode
4647
mode = HOMEBREW_LOCK_DIR.stat.mode & 0777
4748
HOMEBREW_LOCK_DIR.chmod 0555
49+
expect(HOMEBREW_LOCK_DIR.stat.mode).not_to eq(prev_mode)
4850

4951
expect(subject.check_access_lock_dir)
5052
.to match("#{HOMEBREW_LOCK_DIR} isn't writable.")

0 commit comments

Comments
 (0)