Declare macro in tasks

This commit is contained in:
Thibault Jouan
2014-09-25 00:27:46 +00:00
parent 8ce8c2f054
commit 3dc414f188
3 changed files with 22 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
Feature: `macro' recipe keyword
Scenario: declares a new keyword accepting task code
Scenario: declares a new recipe keyword accepting task code
Given a recipe with:
"""
macro :hello do
@@ -12,6 +12,16 @@ Feature: `macro' recipe keyword
When I successfully execute the recipe
Then the output must contain "hello macro"
Scenario: declares a new task keyword
Given a recipe with:
"""
macro(:hello) { echo 'hello macro' }
task(:some_task) { hello }
"""
When I successfully execute the recipe
Then the output must contain "hello macro"
Scenario: supports arguments
Given a recipe with:
"""