Sha256: ef63d97fb84dccb9c3b71ffe5bc635be9ceb3be640d461c9f1fdb39c0ecd148b

Contents?: true

Size: 405 Bytes

Versions: 96

Compression:

Stored size: 405 Bytes

Contents

module BackgroundJobs
  def run_background_jobs_immediately
    delay_jobs = Delayed::Worker.delay_jobs
    Delayed::Worker.delay_jobs = false
    yield
  ensure
    Delayed::Worker.delay_jobs = delay_jobs
  end
end

RSpec.configure do |config|
  config.around(:each, type: :feature) do |example|
    run_background_jobs_immediately do
      example.run
    end
  end

  config.include BackgroundJobs
end

Version data entries

96 entries across 96 versions & 12 rubygems

Version Path
welaika-suspenders-2.7.1 templates/background_jobs_rspec.rb
roboparts-0.6.4 templates/background_jobs_rspec.rb
roboparts-0.6.3 templates/background_jobs_rspec.rb
roboparts-0.6.2 templates/background_jobs_rspec.rb
welaika-suspenders-2.7.0 templates/background_jobs_rspec.rb
suspenders-1.24.0 templates/background_jobs_rspec.rb
roboparts-0.6.1 templates/background_jobs_rspec.rb
roboparts-0.6.0 templates/background_jobs_rspec.rb
suspenders-1.23.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.6.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.5.0 templates/background_jobs_rspec.rb
suspenders-1.22.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.4.0 templates/background_jobs_rspec.rb
suspenders-1.21.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.3.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.2.1 templates/background_jobs_rspec.rb
welaika-suspenders-2.2.0 templates/background_jobs_rspec.rb
welaika-suspenders-2.1.0 templates/background_jobs_rspec.rb
suspenders-1.20.0 templates/background_jobs_rspec.rb
suspenders-1.19.0 templates/background_jobs_rspec.rb