class RSpec::Rails::Matchers::BeANew

def matches?(actual)

Other tags:
    Api: - private
def matches?(actual)
  super
  actual.is_a?(expected) && actual.new_record? && attributes_match?(actual)
end