diff options
| author | Jack Nagel | 2013-04-13 17:46:11 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-04-13 18:23:06 -0500 | 
| commit | ef4de70a5f6af8d292a61115a2fd491d55d5412a (patch) | |
| tree | 3011c9c08380df836ee622f4337126427241daa4 /Library/Homebrew/test/test_formula_spec_selection.rb | |
| parent | 04e2ae6d606db14f9449df284bdd68f079288a5b (diff) | |
| download | homebrew-ef4de70a5f6af8d292a61115a2fd491d55d5412a.tar.bz2 | |
Remove obsolete tests
This behavior is now tested at more appropriate levels in
test_software_spec, test_formula_spec_selection, and
test_formula_validation.
Diffstat (limited to 'Library/Homebrew/test/test_formula_spec_selection.rb')
| -rw-r--r-- | Library/Homebrew/test/test_formula_spec_selection.rb | 48 | 
1 files changed, 48 insertions, 0 deletions
| diff --git a/Library/Homebrew/test/test_formula_spec_selection.rb b/Library/Homebrew/test/test_formula_spec_selection.rb index 73cf97ad2..b16192ac3 100644 --- a/Library/Homebrew/test/test_formula_spec_selection.rb +++ b/Library/Homebrew/test/test_formula_spec_selection.rb @@ -10,6 +10,10 @@ class FormulaSpecSelectionTests < Test::Unit::TestCase      assert_equal @_f.send(spec), @_f.active_spec    end +  def assert_spec_unset(spec) +    assert_nil @_f.send(spec) +  end +    def test_selects_head_when_requested      ARGV.stubs(:build_head?).returns(true) @@ -96,4 +100,48 @@ class FormulaSpecSelectionTests < Test::Unit::TestCase      assert_spec_selected :head    end + +  def test_incomplete_spec_not_selected +    formula do +      sha1 'deadbeef'*5 +      version '1.0' +      head 'foo' +    end + +    assert_spec_selected :head +  end + +  def test_incomplete_stable_not_set +    formula do +      sha1 'foo' +      devel { url 'foo-1.1a' } +      head 'foo' +    end + +    assert_spec_unset :stable +    assert_spec_selected :devel +  end + +  def test_incomplete_devel_not_set +    formula do +      url 'foo-1.0' +      devel { version '1.1a' } +      head 'foo' +    end + +    assert_spec_unset :devel +    assert_spec_selected :stable +  end + +  def test_incomplete_bottle_not_set +    formula do +      url 'foo-1.0' +      bottle do +        sha1 'deadbeef'*5 => :some_nonexistent_thing +      end +    end + +    assert_spec_unset :bottle +    assert_spec_selected :stable +  end  end | 
