Check method existence rather than Ruby version
This commit is contained in:
parent
28b9790dbd
commit
fdaea3189d
@ -107,7 +107,7 @@ 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 unless method_defined?(:assert_empty)
|
||||
end
|
||||
|
||||
class Test::Unit::TestCase
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user