aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-03-10 14:56:02 -0500
committerJack Nagel2014-03-10 14:56:02 -0500
commit2bf3e69866d30ccfea48f123aab2e9c9bfca0293 (patch)
tree6fa9d6576412ed6a38856ffce13aa87a279371d1 /Library/Homebrew/test
parentee7d227a2f31b9f30aeaba4dae7b52d3999038b6 (diff)
downloadhomebrew-2bf3e69866d30ccfea48f123aab2e9c9bfca0293.tar.bz2
Make bottle implementation more generic
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_formula.rb7
-rw-r--r--Library/Homebrew/test/test_formula_spec_selection.rb21
-rw-r--r--Library/Homebrew/test/test_software_spec.rb4
3 files changed, 5 insertions, 27 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index 9c168e1e6..910726e58 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -182,7 +182,6 @@ class FormulaTests < Test::Unit::TestCase
assert_equal f.stable, f.active_spec
assert_instance_of SoftwareSpec, f.stable
- assert_instance_of Bottle, f.bottle
assert_instance_of SoftwareSpec, f.devel
assert_instance_of HeadSoftwareSpec, f.head
end
@@ -216,7 +215,7 @@ class FormulaTests < Test::Unit::TestCase
def test_class_specs_are_always_initialized
f = formula { url 'foo-1.0' }
- %w{stable devel head bottle}.each do |spec|
+ %w{stable devel head}.each do |spec|
assert_kind_of SoftwareSpec, f.class.send(spec)
end
end
@@ -224,7 +223,7 @@ class FormulaTests < Test::Unit::TestCase
def test_incomplete_instance_specs_are_not_accessible
f = formula { url 'foo-1.0' }
- %w{devel head bottle}.each { |spec| assert_nil f.send(spec) }
+ %w{devel head}.each { |spec| assert_nil f.send(spec) }
end
def test_honors_attributes_declared_before_specs
@@ -234,7 +233,7 @@ class FormulaTests < Test::Unit::TestCase
devel { url 'foo-1.1' }
end
- %w{stable devel head bottle}.each do |spec|
+ %w{stable devel head}.each do |spec|
assert_equal 'foo', f.class.send(spec).deps.first.name
end
end
diff --git a/Library/Homebrew/test/test_formula_spec_selection.rb b/Library/Homebrew/test/test_formula_spec_selection.rb
index a572623d8..af23a002c 100644
--- a/Library/Homebrew/test/test_formula_spec_selection.rb
+++ b/Library/Homebrew/test/test_formula_spec_selection.rb
@@ -34,17 +34,6 @@ class FormulaSpecSelectionTests < Test::Unit::TestCase
assert_spec_selected :devel
end
- def test_selects_bottle_when_available
- formula do
- def install_bottle?(*); true; end
-
- url 'foo-1.0'
- bottle { sha1 TEST_SHA1 => bottle_tag }
- end
-
- assert_spec_selected :bottle
- end
-
def test_selects_stable_by_default
formula do
url 'foo-1.0'
@@ -119,14 +108,4 @@ class FormulaSpecSelectionTests < Test::Unit::TestCase
assert_spec_unset :devel
assert_spec_selected :stable
end
-
- def test_incomplete_bottle_not_set
- formula do
- url 'foo-1.0'
- bottle { sha1 TEST_SHA1 => :some_nonexistent_thing }
- end
-
- assert_spec_unset :bottle
- assert_spec_selected :stable
- end
end
diff --git a/Library/Homebrew/test/test_software_spec.rb b/Library/Homebrew/test/test_software_spec.rb
index bd226c5f9..c35294320 100644
--- a/Library/Homebrew/test/test_software_spec.rb
+++ b/Library/Homebrew/test/test_software_spec.rb
@@ -98,9 +98,9 @@ class HeadSoftwareSpecTests < Test::Unit::TestCase
end
end
-class BottleTests < Test::Unit::TestCase
+class BottleSpecificationTests < Test::Unit::TestCase
def setup
- @spec = Bottle.new
+ @spec = BottleSpecification.new
end
def test_checksum_setters