Implement recipe evaluation feature

This commit is contained in:
Thibault Jouan
2013-07-22 14:59:54 +00:00
parent f0d90c96e9
commit 0921be9ab0
8 changed files with 95 additions and 2 deletions

10
features/recipe.feature Normal file
View File

@@ -0,0 +1,10 @@
Feature: recipe evaluation
Scenario: evaluates ruby code in a recipe
Given a recipe with:
"""
puts 'hello from recipe'
"""
When I execute the recipe
Then the exit status must be 0
And the output must contain "hello from recipe"

View File

@@ -0,0 +1,7 @@
Given(/^a recipe with:$/) do |recipe_body|
write_file 'recipe.rb', recipe_body
end
When(/^I execute the recipe$/) do
run_simple('producer localhost recipe.rb', false)
end