Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (18 sloc) 0.375 kB
module RSpec::Rails::Matchers
class BeANewRecord
include RSpec::Matchers::BuiltIn::BaseMatcher
# @api private
def matches?(actual)
!actual.persisted?
end
end
# Passes if actual returns `false` for `persisted?`.
#
# @example
#
# get :new
# assigns(:thing).should be_new_record
def be_new_record
BeANewRecord.new
end
end
Jump to Line
Something went wrong with that request. Please try again.