aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAndrea Kao2016-08-08 11:20:25 -0700
committerMartin Afanasjew2016-08-08 22:44:36 +0200
commit8c0b72ac0da44be8cc4655996a336caa46f21694 (patch)
treefa925d4772a1c313c56d68e151890ca9c43bbe41 /Library
parentc8b0a55c097f13556a27223b15196a3e23e36483 (diff)
downloadbrew-8c0b72ac0da44be8cc4655996a336caa46f21694.tar.bz2
tests: extend cmd/install integration test
Closes #626. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_integration_cmds.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb
index 393d1d19a..330e7c0a8 100644
--- a/Library/Homebrew/test/test_integration_cmds.rb
+++ b/Library/Homebrew/test/test_integration_cmds.rb
@@ -265,9 +265,24 @@ class IntegrationCommandTests < Homebrew::TestCase
end
def test_install
- setup_test_formula "testball"
+ setup_test_formula "testball1"
+ assert_match "Specify `--HEAD`", cmd_fail("install", "testball1", "--head")
+ assert_match "No head is defined", cmd_fail("install", "testball1", "--HEAD")
+ assert_match "No devel block", cmd_fail("install", "testball1", "--devel")
+ assert_match "#{HOMEBREW_CELLAR}/testball1/0.1", cmd("install", "testball1")
+ assert_match "testball1-0.1 already installed", cmd("install", "testball1")
+ assert_match "MacRuby is not packaged", cmd_fail("install", "macruby")
+ assert_match "No available formula", cmd_fail("install", "formula")
+ assert_match "This similarly named formula was found",
+ cmd_fail("install", "testball")
- assert_match "#{HOMEBREW_CELLAR}/testball/0.1", cmd("install", "testball")
+ setup_test_formula "testball2"
+ assert_match "These similarly named formulae were found",
+ cmd_fail("install", "testball")
+
+ install_and_rename_coretap_formula "testball1", "testball2"
+ assert_match "testball1 already installed, it's just not migrated",
+ cmd("install", "testball2")
end
def test_bottle