method

assert_nothing_raised

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveSupport::Testing::Assertions
assert_nothing_raised() public

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
Show source
Register or log in to add new notes.