Implement CLI debug option

This commit is contained in:
Thibault Jouan
2014-10-12 18:26:48 +00:00
parent 25d03d4322
commit e22d0039e1
8 changed files with 64 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
Feature: CLI debug option
Background:
Given a recipe with:
"""
task(:trigger_error) { fail 'some error' }
"""
Scenario: reports recipe errors
When I execute the recipe with option -d
Then the output must match /\ARuntimeError:.*\n\ncause:\nRuntimeError:/

View File

@@ -10,6 +10,7 @@ Feature: CLI usage
options:
-v, --verbose enable verbose mode
-d, --debug enable debug mode
-n, --dry-run enable dry run mode
-t, --target HOST target host
"""

View File

@@ -24,6 +24,10 @@ When /^I successfully execute the recipe on remote target$/ do
assert_exit_status 0
end
When /^I execute the recipe with option (-.+)$/ do |option|
run_simple "producer #{option} recipe.rb", false
end
When /^I successfully execute the recipe with option (-.+)$/ do |option|
run_simple "producer #{option} recipe.rb", false
assert_exit_status 0