Class: RSpec::Rails::Matchers::BeANewRecord

Inherits:
Object
  • Object
show all
Includes:
Matchers::BaseMatcher
Defined in:
lib/rspec/rails/matchers/be_new_record.rb

Instance Method Summary collapse

Instance Method Details

#matches?(actual) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


6
7
8
# File 'lib/rspec/rails/matchers/be_new_record.rb', line 6

def matches?(actual)
  !actual.persisted?
end