aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/diagnostic_spec.rb
diff options
context:
space:
mode:
authormansimarkaur2017-04-03 07:06:59 +0530
committermansimarkaur2017-04-03 07:06:59 +0530
commitfda41919cf396cf1ab7a6fe51aead448e21f93dd (patch)
tree53a6d7180631d8f8831a528a64c323405d19acb3 /Library/Homebrew/test/diagnostic_spec.rb
parent8ea778f7c7ea790694485030d105a92a9416ef33 (diff)
downloadbrew-fda41919cf396cf1ab7a6fe51aead448e21f93dd.tar.bz2
Added test for check_access_lock_dir
Diffstat (limited to 'Library/Homebrew/test/diagnostic_spec.rb')
-rw-r--r--Library/Homebrew/test/diagnostic_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/test/diagnostic_spec.rb b/Library/Homebrew/test/diagnostic_spec.rb
index 59560127c..c4ff1f458 100644
--- a/Library/Homebrew/test/diagnostic_spec.rb
+++ b/Library/Homebrew/test/diagnostic_spec.rb
@@ -41,6 +41,18 @@ describe Homebrew::Diagnostic::Checks do
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_logs)
+ .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