Implement `macro' recipe keyword

This commit is contained in:
Thibault Jouan
2013-12-20 09:51:15 +00:00
parent 43a781dc78
commit e8be44d1f0
7 changed files with 93 additions and 13 deletions

View File

@@ -53,6 +53,15 @@ module Producer::Core
.to throw_symbol :task_code
end
context 'when arguments are given' do
let(:block) { proc { |e| throw e } }
it 'passes arguments as block parameters' do
expect { dsl.evaluate env, :some_argument }
.to throw_symbol :some_argument
end
end
context 'when a defined keyword action is called' do
let(:some_action_class) { Class.new(Action) }
let(:block) { proc { some_action } }