aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2013-01-23 00:26:28 -0600
committerJack Nagel2013-01-26 12:14:46 -0600
commit046d802d0994be84802c6c50b6336b27b6d8ddd5 (patch)
tree588f004499b99a6f28891d88b2d97e9299d4d7b2 /Library/Homebrew/test
parent951872c4be7f1190a0d9127aeb051d0b6ddd8b54 (diff)
downloadbrew-046d802d0994be84802c6c50b6336b27b6d8ddd5.tar.bz2
FormulaInstaller: allow formulae to pass options to deps
Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is raised. Eventually we may be able to just stash the existing keg and reinstall it with the combined set of used_options and passed options, but enabling that is left for another day.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_dependency.rb3
-rw-r--r--Library/Homebrew/test/test_dependency_collector.rb1
2 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_dependency.rb b/Library/Homebrew/test/test_dependency.rb
index a043c1bd5..b9dbb35c8 100644
--- a/Library/Homebrew/test/test_dependency.rb
+++ b/Library/Homebrew/test/test_dependency.rb
@@ -1,5 +1,6 @@
require 'testing_env'
require 'dependencies'
+require 'options'
class DependableTests < Test::Unit::TestCase
def setup
@@ -8,7 +9,7 @@ class DependableTests < Test::Unit::TestCase
end
def test_options
- assert_equal %w{--foo --bar}.sort, @dep.options.sort
+ assert_equal %w{--foo --bar}.sort, @dep.options.as_flags.sort
end
def test_interrogation
diff --git a/Library/Homebrew/test/test_dependency_collector.rb b/Library/Homebrew/test/test_dependency_collector.rb
index ded49f91f..3403fc089 100644
--- a/Library/Homebrew/test/test_dependency_collector.rb
+++ b/Library/Homebrew/test/test_dependency_collector.rb
@@ -1,5 +1,6 @@
require 'testing_env'
require 'dependencies'
+require 'options'
require 'extend/set'
module DependencyCollectorTestExtension