Rename Interpreter class as Worker
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
require 'spec_helper'
|
||||
|
||||
module Producer::Core
|
||||
describe Interpreter do
|
||||
subject(:interpreter) { Interpreter.new }
|
||||
describe Worker do
|
||||
subject(:worker) { described_class.new }
|
||||
|
||||
describe '#process' do
|
||||
it 'processes each task' do
|
||||
expect(interpreter).to receive(:process_task).with(:some_task)
|
||||
interpreter.process [:some_task]
|
||||
expect(worker).to receive(:process_task).with(:some_task)
|
||||
worker.process [:some_task]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ module Producer::Core
|
||||
context 'when task condition is met' do
|
||||
it 'applies the actions' do
|
||||
expect(action).to receive :apply
|
||||
interpreter.process_task task
|
||||
worker.process_task task
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ module Producer::Core
|
||||
|
||||
it 'does not apply the actions' do
|
||||
expect(action).not_to receive :apply
|
||||
interpreter.process_task task
|
||||
worker.process_task task
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user