Skip to content

Commit

Permalink
Merge pull request #2446 from mansimarkaur/diagnostic_tests
Browse files Browse the repository at this point in the history
[WIP] Added test for check_access_lock_dir
  • Loading branch information
MikeMcQuaid committed Apr 16, 2017
2 parents 02f0189 + 7e455a6 commit 46f6dc4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Library/Homebrew/test/diagnostic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
end
end

specify "#check_access_lock_dir" do
begin
mode = HOMEBREW_LOCK_DIR.stat.mode & 0777
HOMEBREW_LOCK_DIR.chmod 0555

expect(subject.check_access_lock_dir)
.to match("#{HOMEBREW_LOCK_DIR} isn't writable.")
ensure
HOMEBREW_LOCK_DIR.chmod mode
end
end

specify "#check_access_logs" do
begin
mode = HOMEBREW_LOGS.stat.mode & 0777
Expand Down

0 comments on commit 46f6dc4

Please sign in to comment.