diff options
| author | Jack Nagel | 2014-03-10 14:56:02 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-10 14:56:02 -0500 |
| commit | 7da459874fa289d3ebe8b82693e85893499a3148 (patch) | |
| tree | ba71d538df0a177113807101eeadb53a089c167d /Library/Homebrew/test | |
| parent | 97dd5f61c461e2003efaee0e4428e5e2c1245e51 (diff) | |
| download | brew-7da459874fa289d3ebe8b82693e85893499a3148.tar.bz2 | |
Make bottle implementation more generic
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_formula_spec_selection.rb | 21 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_software_spec.rb | 4 |
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 |
