module ActiveSupport::Testing::Deprecation

def assert_not_deprecated(deprecator = nil, &block)

def assert_not_deprecated(deprecator = nil, &block)
  result, deprecations = collect_deprecations(deprecator, &block)
  assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n  #{deprecations * "\n  "}"
  result
end