Sha256: 208b6b9d117ee8030ab552dec0ed895b0f14bfa29a23171c5ec5192420e2f199
Contents?: true
Size: 574 Bytes
Versions: 11
Compression:
Stored size: 574 Bytes
Contents
require 'minitest_helper' describe Asynchronic::QueueEngine::Synchronic do before do Asynchronic.configure do |config| config.queue_engine = Asynchronic::QueueEngine::Synchronic.new end end it 'Original job' do pid = BasicJob.enqueue input: 1 process = Asynchronic[pid] process.result.must_equal 2 end it 'Stub job' do Asynchronic.queue_engine.stub BasicJob do |process| process.params[:input] + 19 end pid = BasicJob.enqueue input: 1 process = Asynchronic[pid] process.result.must_equal 20 end end
Version data entries
11 entries across 11 versions & 1 rubygems