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:
parent
d2166c09b0
commit
f159bbd17d
2 changed files with 4 additions and 4 deletions
|
@ -3,6 +3,10 @@
|
||||||
module Test
|
module Test
|
||||||
module Unit
|
module Unit
|
||||||
module Assertions
|
module Assertions
|
||||||
|
def assert_raises(*exp, &b)
|
||||||
|
raise NoMethodError, "use assert_raise", caller
|
||||||
|
end
|
||||||
|
|
||||||
def _assertions= n # :nodoc:
|
def _assertions= n # :nodoc:
|
||||||
@_assertions = n
|
@_assertions = n
|
||||||
end
|
end
|
||||||
|
|
|
@ -563,10 +563,6 @@ module Test
|
||||||
assert yield, *msgs
|
assert yield, *msgs
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_raises(*exp, &b)
|
|
||||||
raise NoMethodError, "use assert_raise", caller
|
|
||||||
end
|
|
||||||
|
|
||||||
# :call-seq:
|
# :call-seq:
|
||||||
# assert_nothing_thrown( failure_message = nil, &block )
|
# assert_nothing_thrown( failure_message = nil, &block )
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue