Sha256: 64a72346d32f38f5b4373baff92848d56ab0c3aebe1d78c5b1c2af466216ccbf

Contents?: true

Size: 923 Bytes

Versions: 13

Compression:

Stored size: 923 Bytes

Contents

RSpec.configure do |config|
  config.around(:each, async_execution: true) do |ex|
    current_async_execution = Adhoq.config.async_execution

    Adhoq.config.async_execution = true

    ex.call

    Adhoq.config.async_execution = current_async_execution
  end

  config.around(:each, active_job_test_adapter: true) do |ex|
    current_active_job_queue_adapter = Adhoq::Engine.config.active_job.queue_adapter
    current_execute_job_queue_adapter = Adhoq::ExecuteJob.queue_adapter

    Adhoq::Engine.config.active_job.queue_adapter = :test
    Adhoq::ExecuteJob.queue_adapter = ActiveJob::QueueAdapters::TestAdapter.new
    Adhoq::ExecuteJob.queue_adapter.perform_enqueued_jobs = true

    ex.call

    Adhoq::ExecuteJob.queue_adapter.performed_jobs.clear
    Adhoq::Engine.config.active_job.queue_adapter = current_active_job_queue_adapter
    Adhoq::ExecuteJob.queue_adapter = current_execute_job_queue_adapter
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adhoq-1.0.2 spec/support/activejob_helper.rb
adhoq-1.0.1 spec/support/activejob_helper.rb
adhoq-1.0.0 spec/support/activejob_helper.rb
adhoq-0.5.0 spec/support/activejob_helper.rb
adhoq-0.5.0.beta1 spec/support/activejob_helper.rb
adhoq-0.4.0 spec/support/activejob_helper.rb
adhoq-0.3.0 spec/support/activejob_helper.rb
adhoq-0.2.0 spec/support/activejob_helper.rb
adhoq-0.1.2 spec/support/activejob_helper.rb
adhoq-0.1.1 spec/support/activejob_helper.rb
adhoq-0.1.0 spec/support/activejob_helper.rb
adhoq-0.0.7 spec/support/activejob_helper.rb
adhoq-0.0.6 spec/support/activejob_helper.rb