homebrew-cask-versions/test/cask/cli/doctor_test.rb
Roland Walker 3633384036 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
2014-02-01 12:47:05 -05:00

18 lines
467 B
Ruby

require 'test_helper'
require 'cask/version'
describe Cask::CLI::Doctor do
it 'displays some nice info about the environment' do
out, err = capture_io do
Cask::CLI::Doctor.run
end
# no point in trying to match more of this environment-specific info
out.must_match /\A==> OS X Version:/
end
it "raises an exception when arguments are given" do
lambda {
Cask::CLI::Doctor.run('argument')
}.must_raise ArgumentError
end
end