spec/process/life_cycle_examples.rb in asynchronic-1.1.0 vs spec/process/life_cycle_examples.rb in asynchronic-1.1.1
- old
+ new
@@ -2,10 +2,15 @@
let(:env) { Asynchronic::Environment.new queue_engine, data_store }
let(:queue) { env.default_queue }
+ after do
+ data_store.clear
+ queue_engine.clear
+ end
+
def create(type, params={})
env.create_process type, params
end
def execute(queue)
@@ -415,11 +420,11 @@
process.processes.first.processes.first.queue.must_be_nil
execute queue
end
it 'Inheritance of queues in processes. Specify queue in params' do
- process = create NestedJob, {input: 100, queue: :test_queue}
+ process = create NestedJob, input: 100, queue: :test_queue
process.queue.must_equal :test_queue
process.enqueue
execute queue_engine[:test_queue]
@@ -430,10 +435,10 @@
process.processes.first.processes.first.queue.must_equal :test_queue
execute queue_engine[:test_queue]
end
it 'Inheritance of queues in processes. Redefine queue in job class' do
- process = create NestedJobWithDifferentsQueues, {input: 100, queue: :test_queue}
+ process = create NestedJobWithDifferentsQueues, input: 100, queue: :test_queue
process.queue.must_equal :test_queue
process.enqueue
execute queue_engine[:test_queue]
\ No newline at end of file