module RSpec::Rails::Mocks::ActiveRecordStubExtensions
def as_new_record
def as_new_record self.__send__("#{self.class.primary_key}=", nil) super end
def connection
Raises an IllegalDataAccessException (stubbed models are not allowed to access the database)
def connection raise RSpec::Rails::IllegalDataAccessException.new("stubbed models are not allowed to access the database") end
def new_record?
def new_record? !persisted? end