aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/install_test.rb
diff options
context:
space:
mode:
authorAlyssa Ross2017-01-23 17:54:31 +0000
committerGitHub2017-01-23 17:54:31 +0000
commit2c1fbe16931bd366d33d4419c59fcc8ada9cfe7d (patch)
tree7dec252366b87b02b7ad9171e3b618f03ecc2ee7 /Library/Homebrew/test/install_test.rb
parentd6932548f89c48e6c33df4c24685ae58904e9b7a (diff)
parent62a0c3a6f5cd6577cf9e628524b88b91b9419df7 (diff)
downloadbrew-2c1fbe16931bd366d33d4419c59fcc8ada9cfe7d.tar.bz2
Merge pull request #1890 from alyssais/global_teardown_env
tests: automatically restore ENV in teardown
Diffstat (limited to 'Library/Homebrew/test/install_test.rb')
-rw-r--r--Library/Homebrew/test/install_test.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/Library/Homebrew/test/install_test.rb b/Library/Homebrew/test/install_test.rb
index fa0ef5ffe..da6c1863f 100644
--- a/Library/Homebrew/test/install_test.rb
+++ b/Library/Homebrew/test/install_test.rb
@@ -73,13 +73,6 @@ class IntegrationCommandTestInstall < IntegrationCommandTestCase
end
def test_install_head_installed
- initial_env = ENV.to_hash
- %w[AUTHOR COMMITTER].each do |role|
- ENV["GIT_#{role}_NAME"] = "brew tests"
- ENV["GIT_#{role}_EMAIL"] = "brew-tests@localhost"
- ENV["GIT_#{role}_DATE"] = "Thu May 21 00:04:11 2009 +0100"
- end
-
repo_path = HOMEBREW_CACHE.join("repo")
repo_path.join("bin").mkpath
@@ -105,14 +98,11 @@ class IntegrationCommandTestInstall < IntegrationCommandTestCase
# Ignore dependencies, because we'll try to resolve requirements in build.rb
# and there will be the git requirement, but we cannot instantiate git
# formula since we only have testball1 formula.
- assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-2ccdf4f", cmd("install", "testball1", "--HEAD", "--ignore-dependencies")
- assert_match "testball1-HEAD-2ccdf4f already installed",
+ assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-d5eb689", cmd("install", "testball1", "--HEAD", "--ignore-dependencies")
+ assert_match "testball1-HEAD-d5eb689 already installed",
cmd("install", "testball1", "--HEAD", "--ignore-dependencies")
- assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-2ccdf4f", cmd("unlink", "testball1")
+ assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-d5eb689", cmd("unlink", "testball1")
assert_match "#{HOMEBREW_CELLAR}/testball1/1.0", cmd("install", "testball1")
-
- ensure
- ENV.replace(initial_env)
end
def test_install_with_invalid_option