diff options
Diffstat (limited to 'activesupport/lib/active_support/test_case.rb')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index d9a668c0ea..221e1171e7 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -66,12 +66,15 @@ 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) + def assert_nothing_raised yield end end |