Class: RSpec::Rails::Matchers::BeANewRecord
- Inherits:
-
Matchers::BuiltIn::BaseMatcher
- Object
- Matchers::BuiltIn::BaseMatcher
- RSpec::Rails::Matchers::BeANewRecord
- Defined in:
- lib/rspec/rails/matchers/be_new_record.rb
Instance Method Summary (collapse)
- - (Object) failure_message_for_should
- - (Object) failure_message_for_should_not
- - (Boolean) matches?(actual) private
Instance Method Details
- (Object) failure_message_for_should
9 10 11 |
# File 'lib/rspec/rails/matchers/be_new_record.rb', line 9 def "expected #{actual.inspect} to be a new record, but was persisted" end |
- (Object) failure_message_for_should_not
13 14 15 |
# File 'lib/rspec/rails/matchers/be_new_record.rb', line 13 def "expected #{actual.inspect} to be persisted, but was a new record" end |
- (Boolean) matches?(actual)
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.
5 6 7 |
# File 'lib/rspec/rails/matchers/be_new_record.rb', line 5 def matches?(actual) !actual.persisted? end |