method
assert_not_deprecated
v7.0.0 -
Show latest stable
- Class:
ActiveSupport::Testing::Deprecation
assert_not_deprecated(deprecator = nil, &block)public
Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block.
assert_not_deprecated(CustomDeprecator) do CustomDeprecator.warn "message" # fails assertion end
If no deprecator is given, defaults to ActiveSupport::Deprecation.
assert_not_deprecated do ActiveSupport::Deprecation.warn "message" # fails assertion end assert_not_deprecated do CustomDeprecator.warn "message" # passes assertion end