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
Merge pull request #2733 from rolandwalker/testing_constants

add HOMEBREW_TAP_FORMULA_REGEX constant in tests