Method: RSpec::Resources::DSL::Matchers#destroys_the_subject

Defined in:
lib/rspec/resources/dsl/matchers.rb

#destroys_the_subjectObject



53
54
55
56
57
# File 'lib/rspec/resources/dsl/matchers.rb', line 53

def destroys_the_subject
  try_set_description 'deletes the record'

  expect(subject.class.find_by_id(subject.id)).to be_nil
end