1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prevent accidental use of assert_raises

This commit is contained in:
Nobuyoshi Nakada 2022-06-25 19:05:36 +09:00
parent d2166c09b0
commit f159bbd17d
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 4 additions and 4 deletions

View file

@ -3,6 +3,10 @@
module Test
module Unit
module Assertions
def assert_raises(*exp, &b)
raise NoMethodError, "use assert_raise", caller
end
def _assertions= n # :nodoc:
@_assertions = n
end

View file

@ -563,10 +563,6 @@ module Test
assert yield, *msgs
end
def assert_raises(*exp, &b)
raise NoMethodError, "use assert_raise", caller
end
# :call-seq:
# assert_nothing_thrown( failure_message = nil, &block )
#