diff options
| author | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
| commit | 0af7d5611e09d88dbcec602bd523d8a72a81c57b (patch) | |
| tree | cab0b66a9828c51cc9948690ff30b24382c765fa /Library/Homebrew/test | |
| parent | d2c4be9ebee74145ea7eb2f54273df1b5c29c1f0 (diff) | |
| download | homebrew-0af7d5611e09d88dbcec602bd523d8a72a81c57b.tar.bz2 | |
Move dependencies to SoftwareSpec
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 21 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_software_spec.rb | 18 | 
2 files changed, 18 insertions, 21 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 037a8f9be..1591b425b 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -208,25 +208,4 @@ class FormulaTests < Test::Unit::TestCase    ensure      path.unlink    end - -  def test_dependency_option_integration -    f = formula do -      url 'foo-1.0' -      depends_on 'foo' => :optional -      depends_on 'bar' => :recommended -    end - -    assert f.build.has_option?('with-foo') -    assert f.build.has_option?('without-bar') -  end - -  def test_explicit_options_override_default_dep_option_description -    f = formula do -      url 'foo-1.0' -      option 'with-foo', 'blah' -      depends_on 'foo' => :optional -    end - -    assert_equal 'blah', f.build.first.description -  end  end diff --git a/Library/Homebrew/test/test_software_spec.rb b/Library/Homebrew/test/test_software_spec.rb index c534cd008..66ac7feb6 100644 --- a/Library/Homebrew/test/test_software_spec.rb +++ b/Library/Homebrew/test/test_software_spec.rb @@ -47,6 +47,24 @@ class SoftwareSpecTests < Test::Unit::TestCase      @spec.option(:foo)      assert @spec.build.has_option? 'foo'    end + +  def test_depends_on +    @spec.depends_on('foo') +    assert_equal 'foo', @spec.deps.first.name +  end + +  def test_dependency_option_integration +    @spec.depends_on 'foo' => :optional +    @spec.depends_on 'bar' => :recommended +    assert @spec.build.has_option?('with-foo') +    assert @spec.build.has_option?('without-bar') +  end + +  def test_explicit_options_override_default_dep_option_description +    @spec.option('with-foo', 'blah') +    @spec.depends_on('foo' => :optional) +    assert_equal 'blah', @spec.build.first.description +  end  end  class HeadSoftwareSpecTests < Test::Unit::TestCase  | 
