add HOMEBREW_TAP_FORMULA_REGEX constant in tests

because our code tries to use it when throwing exceptions
also move `HOMEBREW_BREW_FILE` from `doctor_test.rb` to `test_helper.rb`