Sha256: 6f2d25cd76889aaf44830e3cd7131be1be9ab4c367175ad4ca60f58db7341310

Contents?: true

Size: 315 Bytes

Versions: 2

Compression:

Stored size: 315 Bytes

Contents

# encoding: UTF-8

RSpec::Matchers.define :have_been_destroyed do
  match do |actual|
    !actual.class.where(id: actual.id).exists?
  end

  description do
    "model should have been destroyed"
  end

  failure_message do |actual|
    "expected #{actual.class}(id: #{actual.id}) to have been destroyed"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
delayed_job_heartbeat_plugin-0.2.0 spec/support/destroyed_model.rb
delayed_job_heartbeat_plugin-0.1.0 spec/support/destroyed_model.rb