ActiveJob::Base.queue_adapter
For multi-containers testing environment(e.g. CI), if the have-enqueued-job-matcher was not working as expected, but it's okay for single container testing, you may do the ActiveJob::Base.queue_adapter setting before testing-examples to work around, especially using sidkiq workers and activejob in the same codebase.
before(:all) { ActiveJob::Base.queue_adapter = :test }
# or
before { ActiveJob::Base.queue_adapter = :test }
# or
before(:all) { ActiveJob::Base.queue_adapter = :sidekiq }
# or
before { ActiveJob::Base.queue_adapter = :sidekiq }
Reference
https://relishapp.com/rspec/rspec-rails/docs/matchers/have-enqueued-job-matcher