Sha256: 2125a3a22a93b6387b18f7aae034549dd3faf07b6d03b01c20b3b512a03fb116
Contents?: true
Size: 1.07 KB
Versions: 27
Compression:
Stored size: 1.07 KB
Contents
require 'spec_helper' RSpec.describe Shoryuken::Worker::InlineExecutor do before do Shoryuken.worker_executor = described_class end describe '.perform_async' do specify do expect_any_instance_of(TestWorker).to receive(:perform).with(anything, 'test') TestWorker.perform_async('test') end end describe '.perform_in' do specify do expect_any_instance_of(TestWorker).to receive(:perform).with(anything, 'test') TestWorker.perform_in(60, 'test') end end context 'batch' do before do TestWorker.get_shoryuken_options['batch'] = true end after do TestWorker.get_shoryuken_options['batch'] = false end describe '.perform_async' do specify do expect_any_instance_of(TestWorker).to receive(:perform).with(anything, ['test']) TestWorker.perform_async('test') end end describe '.perform_in' do specify do expect_any_instance_of(TestWorker).to receive(:perform).with(anything, ['test']) TestWorker.perform_in(60, 'test') end end end end
Version data entries
27 entries across 27 versions & 1 rubygems