Skip to content

Commit

Permalink
We expect queue adapters to be objects, no classes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Sep 5, 2023
1 parent 4bb599c commit 3c17dab
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions activejob/test/jobs/enqueue_error_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

class EnqueueErrorJob < ActiveJob::Base
class EnqueueErrorAdapter
class << self
def enqueue(*)
raise ActiveJob::EnqueueError, "There was an error enqueuing the job"
end
def enqueue(*)
raise ActiveJob::EnqueueError, "There was an error enqueuing the job"
end

def enqueue_at(*)
raise ActiveJob::EnqueueError, "There was an error enqueuing the job"
end
def enqueue_at(*)
raise ActiveJob::EnqueueError, "There was an error enqueuing the job"
end
end

self.queue_adapter = EnqueueErrorAdapter
self.queue_adapter = EnqueueErrorAdapter.new

def perform
raise "This should never be called"
Expand Down

0 comments on commit 3c17dab

Please sign in to comment.