Rename Interpreter class as Worker

This commit is contained in:
Thibault Jouan
2014-01-09 01:08:49 +00:00
parent cdc3128727
commit 4c0a7f0fc7
4 changed files with 9 additions and 9 deletions

View File

@@ -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