aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 39bea8ee6..e5b071c0f 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -515,6 +515,9 @@ class Formula
def test
require 'test/unit/assertions'
extend(Test::Unit::Assertions)
+ # Adding the used options allows us to use `build.with?` inside of tests
+ tab = Tab.for_name(name)
+ tab.used_options.each { |opt| build.args << opt unless build.has_opposite_of? opt }
ret = nil
mktemp do
@testpath = Pathname.pwd