Implement Recipe{.,#}compose_macro

This commit is contained in:
Thibault Jouan
2014-09-22 22:04:19 +00:00
parent a60140a1d4
commit 52ecf4899b
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
Feature: `compose_macro' recipe keyword
Scenario: allows macro composition
Given a recipe with:
"""
macro :hello do |prefix, *args|
echo 'hello %s %s' % [prefix, args.join(', ')]
end
compose_macro :hello_composed, :hello, 'composed'
hello_composed :foo, :bar
"""
When I successfully execute the recipe
Then the output must contain "hello composed foo, bar"