diff --git a/Formula/git-hooks.rb b/Formula/git-hooks.rb index e2711730cc..7240a3595e 100644 --- a/Formula/git-hooks.rb +++ b/Formula/git-hooks.rb @@ -20,9 +20,8 @@ class GitHooks < Formula end test do - HOMEBREW_REPOSITORY.cd do - output = shell_output("git hooks").strip - assert_match(/Listing User, Project, and Global hooks/, output) - end + system "git", "init" + output = shell_output("git hooks").strip + assert_match "Listing User, Project, and Global hooks", output end end