aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-05 01:11:36 +0100
committerAlyssa Ross2016-09-05 01:19:08 +0100
commit65ee5408c3d000393c1b73bfe8fb731a651ee281 (patch)
treec9c68f12bba237f4e556493eab85d9ee00899905 /Library/Homebrew/test
parentc17664b124a84c7b6f8373337b3623003ca30772 (diff)
downloadbrew-65ee5408c3d000393c1b73bfe8fb731a651ee281.tar.bz2
Replace install_name/install_ref with alias_path
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/fixtures/receipt.json2
-rw-r--r--Library/Homebrew/test/test_formula.rb21
-rw-r--r--Library/Homebrew/test/test_formulary.rb5
-rw-r--r--Library/Homebrew/test/test_tab.rb6
-rw-r--r--Library/Homebrew/test/testball.rb2
-rw-r--r--Library/Homebrew/test/testball_bottle.rb2
6 files changed, 12 insertions, 26 deletions
diff --git a/Library/Homebrew/test/fixtures/receipt.json b/Library/Homebrew/test/fixtures/receipt.json
index cf93f932d..39dcaea07 100644
--- a/Library/Homebrew/test/fixtures/receipt.json
+++ b/Library/Homebrew/test/fixtures/receipt.json
@@ -11,7 +11,7 @@
"poured_from_bottle": true,
"time": 1403827774,
"HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
- "install_name": "test-formula",
+ "alias_path": "test-formula",
"stdlib": "libcxx",
"compiler": "clang",
"source": {
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index b70ecbb6f..ce1ac28b1 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -8,30 +8,15 @@ class FormulaTests < Homebrew::TestCase
name = "formula_name"
path = Formulary.core_path(name)
spec = :stable
- install_name = "formula_alias"
+ alias_path = "formula_alias"
- f = klass.new(name, path, spec, :install_name => install_name)
+ f = klass.new(name, path, spec, :alias_path => alias_path)
assert_equal name, f.name
assert_equal path, f.path
- assert_equal install_name, f.install_name
+ assert_equal alias_path, f.alias_path
assert_raises(ArgumentError) { klass.new }
end
- def test_install_ref_with_alias
- name = "formula_name"
- path = Formulary.core_path(name)
- spec = :stable
- install_name = "formula_alias"
-
- f = Testball.new(name, path, spec, :install_name => install_name)
- assert_equal f.install_name, f.install_ref
- end
-
- def test_install_ref_with_non_alias
- f = Testball.new
- assert_equal f.path, f.install_ref
- end
-
def test_prefix
f = Testball.new
assert_equal HOMEBREW_CELLAR/f.name/"0.1", f.prefix
diff --git a/Library/Homebrew/test/test_formulary.rb b/Library/Homebrew/test/test_formulary.rb
index 0d34132ec..8b3417dad 100644
--- a/Library/Homebrew/test/test_formulary.rb
+++ b/Library/Homebrew/test/test_formulary.rb
@@ -85,10 +85,11 @@ class FormularyFactoryTest < Homebrew::TestCase
def test_factory_from_alias
alias_dir = CoreTap.instance.alias_dir
alias_dir.mkpath
- FileUtils.ln_s @path, alias_dir/"foo"
+ alias_path = alias_dir/"foo"
+ FileUtils.ln_s @path, alias_path
result = Formulary.factory("foo")
assert_kind_of Formula, result
- assert_equal "foo", result.install_name
+ assert_equal alias_path, result.alias_path
ensure
alias_dir.rmtree
end
diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/test_tab.rb
index dd61fd57b..85fcf4d16 100644
--- a/Library/Homebrew/test/test_tab.rb
+++ b/Library/Homebrew/test/test_tab.rb
@@ -43,7 +43,7 @@ class TabTests < Homebrew::TestCase
assert_nil tab.stable_version
assert_nil tab.devel_version
assert_nil tab.head_version
- assert_nil tab.install_name
+ assert_nil tab.alias_path
assert_equal DevelopmentTools.default_compiler, tab.cxxstdlib.compiler
assert_nil tab.cxxstdlib.type
end
@@ -117,7 +117,7 @@ class TabTests < Homebrew::TestCase
assert_equal "2.14", tab.stable_version.to_s
assert_equal "2.15", tab.devel_version.to_s
assert_equal "HEAD-0000000", tab.head_version.to_s
- assert_equal "test-formula", tab.install_name
+ assert_equal "test-formula", tab.alias_path
end
def test_to_json
@@ -135,7 +135,7 @@ class TabTests < Homebrew::TestCase
assert_equal @tab.stable_version, tab.stable_version
assert_equal @tab.devel_version, tab.devel_version
assert_equal @tab.head_version, tab.head_version
- assert_equal @tab.install_name, tab.install_name
+ assert_equal @tab.alias_path, tab.alias_path
end
def test_remap_deprecated_options
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
index c13c73adb..cce09738d 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/testball.rb
@@ -1,5 +1,5 @@
class Testball < Formula
- def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, install_name: name)
+ def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
self.class.instance_eval do
stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
stable.sha256 TESTBALL_SHA256
diff --git a/Library/Homebrew/test/testball_bottle.rb b/Library/Homebrew/test/testball_bottle.rb
index 584478afd..769f615aa 100644
--- a/Library/Homebrew/test/testball_bottle.rb
+++ b/Library/Homebrew/test/testball_bottle.rb
@@ -1,5 +1,5 @@
class TestballBottle < Formula
- def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, install_name: name)
+ def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
self.class.instance_eval do
stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
stable.sha256 TESTBALL_SHA256