class RSpec::Rails::Matchers::BeANewRecord
def failure_message_for_should
def failure_message_for_should "expected #{actual.inspect} to be a new record, but was persisted" end
def failure_message_for_should_not
def failure_message_for_should_not "expected #{actual.inspect} to be persisted, but was a new record" end
def matches?(actual)
- Api: - private
def matches?(actual) !actual.persisted? end