tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
762c355b30
commit
267ffddbd3
@ -88,3 +88,10 @@ module VersionAssertions
|
|||||||
assert_nil Version.parse(url)
|
assert_nil Version.parse(url)
|
||||||
end
|
end
|
||||||
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user