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:
parent
f391840c36
commit
f672464faf
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue