Simplify Task::DSL.evaluate spec
This commit is contained in:
parent
782c8f8498
commit
0a9f7e38af
@ -28,10 +28,10 @@ module Producer::Core
|
||||
end
|
||||
|
||||
it 'builds a task with its name, actions and condition' do
|
||||
dsl = double('dsl').as_null_object
|
||||
dsl = double(
|
||||
'dsl', actions: [:some_action], condition: :some_condition
|
||||
).as_null_object
|
||||
allow(Task::DSL).to receive(:new) { dsl }
|
||||
allow(dsl).to receive(:actions) { [:some_action] }
|
||||
allow(dsl).to receive(:condition) { :some_condition }
|
||||
expect(Task)
|
||||
.to receive(:new).with(:some_task, [:some_action], :some_condition)
|
||||
Task::DSL.evaluate(name, env, &block)
|
||||
|
Loading…
x
Reference in New Issue
Block a user