From 4ba4812d1dcc40e54e5ad92511dc7005589e075d Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Wed, 20 Jan 2016 01:33:20 +0100 Subject: [PATCH] tests: tap-readme integration test added --- Library/Homebrew/test/test_integration_cmds.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index 7f088c4c5b..3732602508 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -287,6 +287,7 @@ class IntegrationCommandTests < Homebrew::TestCase def test_sh assert_match "Your shell has been configured", cmd("sh", {"SHELL" => "/usr/bin/true"}) + end def test_info formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" @@ -303,6 +304,16 @@ class IntegrationCommandTests < Homebrew::TestCase formula_file.unlink end + def test_tap_readme + (HOMEBREW_LIBRARY/"Taps").mkpath + assert_match "brew install homebrew/foo/", + cmd("tap-readme", "foo", "--verbose") + readme = HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md" + assert readme.exist?, "The README should be created" + ensure + (HOMEBREW_LIBRARY/"Taps").rmtree + end + def test_custom_command mktmpdir do |path| cmd = "int-test-#{rand}"