aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-10-25 22:09:23 -0500
committerJack Nagel2012-10-25 22:09:23 -0500
commitfbfc30fe1cb07f4c257ef998a43e9f37838a4357 (patch)
treea272d3536cb4521b28765e22c9ca27bd232a6087 /Library
parent6ec361aa12fc0a1069ae39b0f479cd732b208363 (diff)
downloadhomebrew-fbfc30fe1cb07f4c257ef998a43e9f37838a4357.tar.bz2
tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/testing_env.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb
index a35ad3f49..a975a83e1 100644
--- a/Library/Homebrew/test/testing_env.rb
+++ b/Library/Homebrew/test/testing_env.rb
@@ -88,3 +88,10 @@ module VersionAssertions
assert_nil Version.parse(url)
end
end
+
+module Test::Unit::Assertions
+ def assert_empty(obj, msg=nil)
+ assert_respond_to(obj, :empty?, msg)
+ assert(obj.empty?, msg)
+ end if RUBY_VERSION.to_f <= 1.8
+end