aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/testing_env.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-25 17:19:18 -0500
committerJack Nagel2013-05-25 17:19:18 -0500
commit4adecd73b64de53913262870a4855e13ae085b81 (patch)
tree46ee80d8e8a294d7a28fe0a5a27f0916e1b2d02b /Library/Homebrew/test/testing_env.rb
parentf0008a7e8f2b8dcab3866a05528c3038df71644e (diff)
downloadbrew-4adecd73b64de53913262870a4855e13ae085b81.tar.bz2
tests: extract common formula helper
Diffstat (limited to 'Library/Homebrew/test/testing_env.rb')
-rw-r--r--Library/Homebrew/test/testing_env.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb
index 8e3c92a32..817346bef 100644
--- a/Library/Homebrew/test/testing_env.rb
+++ b/Library/Homebrew/test/testing_env.rb
@@ -106,3 +106,9 @@ module Test::Unit::Assertions
assert(obj.empty?, msg)
end if RUBY_VERSION.to_f <= 1.8
end
+
+class Test::Unit::TestCase
+ def formula(*args, &block)
+ @_f = Class.new(Formula, &block).new(*args)
+ end
+end