module RSpec::Rails::Mocks::ActiveModelInstanceMethods

def as_new_record

def as_new_record
  self.stub(:persisted?) { false }
  self.stub(:id) { nil }
  self
end

def persisted?

def persisted?
  true
end

def respond_to?(message, include_private=false)

def respond_to?(message, include_private=false)
  message.to_s =~ /_before_type_cast$/ ? false : super
end