aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/diagnostic_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/diagnostic_spec.rb')
-rw-r--r--Library/Homebrew/test/diagnostic_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/test/diagnostic_spec.rb b/Library/Homebrew/test/diagnostic_spec.rb
index 6e2c09268..058b9823c 100644
--- a/Library/Homebrew/test/diagnostic_spec.rb
+++ b/Library/Homebrew/test/diagnostic_spec.rb
@@ -7,7 +7,7 @@ describe Homebrew::Diagnostic::Checks do
end
specify "#check_path_for_trailing_slashes" do
- ENV["PATH"] += File::PATH_SEPARATOR + "/foo/bar/"
+ ENV["HOMEBREW_PATH"] += File::PATH_SEPARATOR + "/foo/bar/"
expect(subject.check_path_for_trailing_slashes)
.to match("Some directories in your path end in a slash")
end
@@ -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.")
@@ -88,13 +90,6 @@ describe Homebrew::Diagnostic::Checks do
end
end
- specify "#check_homebrew_prefix" do
- ENV.delete("JENKINS_HOME")
- # the integration tests are run in a special prefix
- expect(subject.check_homebrew_prefix)
- .to match("Your Homebrew's prefix is not /usr/local.")
- end
-
specify "#check_user_path_1" do
bin = HOMEBREW_PREFIX/"bin"
sep = File::PATH_SEPARATOR