Class: RSpec::ActiveRecord::DestroyRecord
Overview
Instance Method Summary
collapse
#initialize
Methods inherited from Matcher
#supports_block_expectations?
Instance Method Details
#description ⇒ Object
12
13
14
|
# File 'lib/rspec/active_record/destroy_record.rb', line 12
def description
"destroy #{format_record}"
end
|
#failure_message ⇒ Object
16
17
18
|
# File 'lib/rspec/active_record/destroy_record.rb', line 16
def failure_message
"expected to #{description} but did not"
end
|
#failure_message_when_negated ⇒ Object
20
21
22
|
# File 'lib/rspec/active_record/destroy_record.rb', line 20
def failure_message_when_negated
"expected not to #{description} but did"
end
|
#matches?(block) ⇒ Boolean
7
8
9
10
|
# File 'lib/rspec/active_record/destroy_record.rb', line 7
def matches?(block)
block.call
!@record.class.exists?(@record.id)
end
|