Add missing spec for Recipe::DSL#task
This commit is contained in:
parent
d552c698de
commit
29563f6cc6
@ -109,7 +109,12 @@ module Producer::Core
|
||||
end
|
||||
|
||||
describe '#task' do
|
||||
let(:code) { proc { task(:first); task(:last) } }
|
||||
let(:code) { proc { task(:first) { throw :first_task }; task(:last) } }
|
||||
|
||||
it 'register a task with its code' do
|
||||
expect(dsl.tasks.first.name).to eq :first
|
||||
expect { dsl.tasks.first.evaluate(env) }.to throw_symbol :first_task
|
||||
end
|
||||
|
||||
it 'registers tasks in declaration order' do
|
||||
expect(dsl.tasks[0].name).to eq :first
|
||||
|
Loading…
x
Reference in New Issue
Block a user