Move Recipe::DSL#tasks example in spec file
This commit is contained in:
parent
ef96a2db82
commit
3ef533b67a
@ -30,6 +30,15 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
|
||||
describe '#tasks' do
|
||||
let(:code) { proc { task(:some_task) } }
|
||||
|
||||
it 'returns registered tasks' do
|
||||
dsl.evaluate(env)
|
||||
expect(dsl.tasks[0].name).to eq :some_task
|
||||
end
|
||||
end
|
||||
|
||||
describe '#evaluate' do
|
||||
it 'evaluates its code' do
|
||||
dsl = Recipe::DSL.new { throw :recipe_code }
|
||||
@ -100,14 +109,6 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
|
||||
describe '#tasks' do
|
||||
let(:code) { proc { task(:some_task) } }
|
||||
|
||||
it 'returns registered tasks' do
|
||||
expect(dsl.tasks[0].name).to eq :some_task
|
||||
end
|
||||
end
|
||||
|
||||
describe '#task' do
|
||||
let(:code) { proc { task(:first) { throw :first_task }; task(:last) } }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user