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

better docs for ActiveSupport::TestCase#assert_nothing_raised

This commit is contained in:
Tara Scherner de la Fuente 2016-02-18 21:21:24 -08:00
parent f391840c36
commit f672464faf

View file

@ -66,10 +66,13 @@ module ActiveSupport
alias :assert_not_respond_to :refute_respond_to
alias :assert_not_same :refute_same
# Reveals the intention that the block should not raise any exception.
# Assertion that the block should not raise an exception.
#
# Passes if evaluated code in the yielded block raises no exception.
#
# assert_nothing_raised do
# ...
# perform_service(param: 'no_exception')
# end
def assert_nothing_raised(*args)
yield