method

assert_not_deprecated

rails 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

assert_not_deprecated(ActiveSupport::Deprecation.new) do
  CustomDeprecator.warn "message" # passes assertion, different deprecator
end