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
commit267ffddbd3042127d0c8b88580ba12df960981d0 (patch)
tree003a302c78d41fdf098978655ca7c074cce91d9a /Library
parent762c355b30798237c9f5dade43a0d8a9523bcfef (diff)
downloadbrew-267ffddbd3042127d0c8b88580ba12df960981d0.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