method
collect_deprecations
v7.1.3.4 -
Show latest stable
- Class:
ActiveSupport::Testing::Deprecation
collect_deprecations(deprecator = nil)public
Returns the return value of the block and an array of all the deprecation warnings emitted by the given deprecator during the execution of the yielded block.
collect_deprecations(CustomDeprecator) do CustomDeprecator.warn "message" ActiveSupport::Deprecation.new.warn "other message" :result end # => [:result, ["message"]]