Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: fb2f6f18d3
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (17 sloc) 0.365 kb
module RSpec::Rails::Matchers
class BeANewRecord < 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.