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/test_software_spec.rb | |
| parent | d2c4be9ebee74145ea7eb2f54273df1b5c29c1f0 (diff) | |
| download | homebrew-0af7d5611e09d88dbcec602bd523d8a72a81c57b.tar.bz2 | |
Move dependencies to SoftwareSpec
Diffstat (limited to 'Library/Homebrew/test/test_software_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/test_software_spec.rb | 18 | 
1 files changed, 18 insertions, 0 deletions
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  | 
