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
This commit is contained in:
Roland Walker
2014-02-01 12:47:05 -05:00
parent cf2c09912d
commit 3633384036
2 changed files with 3 additions and 2 deletions
-2
View File
@@ -1,8 +1,6 @@
require 'test_helper'
require 'cask/version'
HOMEBREW_BREW_FILE = '/usr/local/bin/brew'
describe Cask::CLI::Doctor do
it 'displays some nice info about the environment' do
out, err = capture_io do
+3
View File
@@ -1,6 +1,9 @@
require 'bundler'
require 'bundler/setup'
# set some Homebrew constants used in our code
HOMEBREW_TAP_FORMULA_REGEX = %r{^(\w+)/(\w+)/([^/]+)$}
HOMEBREW_BREW_FILE = '/usr/local/bin/brew'
# add cask lib to load path
brew_cask_path = Pathname.new(File.expand_path(__FILE__+'/../../'))