tests: extend cmd/home integration test (#305)

This commit is contained in:
Andrea Kao 2016-06-01 16:26:32 -07:00 committed by Martin Afanasjew
parent 4a8fcae3cc
commit e4d0187120

View File

@ -552,6 +552,20 @@ class IntegrationCommandTests < Homebrew::TestCase
def test_home
assert_equal HOMEBREW_WWW,
cmd("home", {"HOMEBREW_BROWSER" => "echo"})
formula_file = CoreTap.new.formula_dir/"testball.rb"
formula_file.write <<-EOS.undent
class Testball < Formula
desc "Some test"
homepage "https://example.com/testball"
url "https://example.com/testball-0.1.tar.gz"
end
EOS
assert_equal Formula["testball"].homepage,
cmd("home", "testball", {"HOMEBREW_BROWSER" => "echo"})
ensure
formula_file.unlink
end
def test_list