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