diff --git a/features/actions/echo.feature b/features/actions/echo.feature index b3ba7a4..b50dd29 100644 --- a/features/actions/echo.feature +++ b/features/actions/echo.feature @@ -7,6 +7,5 @@ Feature: `echo' task action echo 'hello' end """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain exactly "hello\n" diff --git a/features/actions/sh.feature b/features/actions/sh.feature index 2b23a59..fa03114 100644 --- a/features/actions/sh.feature +++ b/features/actions/sh.feature @@ -22,7 +22,7 @@ Feature: sh task action sh '\echo from remote' end """ - When I execute the recipe + When I successfully execute the recipe Then the output must contain "from remote" Scenario: aborts on failed command execution diff --git a/features/recipes/evaluation.feature b/features/recipes/evaluation.feature index ae8b178..c25e925 100644 --- a/features/recipes/evaluation.feature +++ b/features/recipes/evaluation.feature @@ -5,6 +5,5 @@ Feature: recipe evaluation """ puts 'hello from recipe' """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain exactly "hello from recipe\n" diff --git a/features/recipes/source.feature b/features/recipes/source.feature index a02abc0..7913135 100644 --- a/features/recipes/source.feature +++ b/features/recipes/source.feature @@ -11,6 +11,5 @@ Feature: `source' recipe keyword """ puts 'sourced recipe' """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain "sourced recipe" diff --git a/features/recipes/target.feature b/features/recipes/target.feature index 6db55a1..849f42a 100644 --- a/features/recipes/target.feature +++ b/features/recipes/target.feature @@ -7,6 +7,5 @@ Feature: `target' recipe keyword puts env.target """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain exactly "some_host.example\n" diff --git a/features/steps/recipe_steps.rb b/features/steps/recipe_steps.rb index 016d314..30b693c 100644 --- a/features/steps/recipe_steps.rb +++ b/features/steps/recipe_steps.rb @@ -5,3 +5,8 @@ end When(/^I execute the recipe$/) do run_simple('producer recipe.rb', false) end + +When(/^I successfully execute the recipe$/) do + step 'I execute the recipe' + assert_exit_status(0) +end diff --git a/features/tasks/condition.feature b/features/tasks/condition.feature index 78aeb59..85519e2 100644 --- a/features/tasks/condition.feature +++ b/features/tasks/condition.feature @@ -9,6 +9,5 @@ Feature: `condition' task keyword echo 'evaluated' end """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must not contain "evaluated" diff --git a/features/tasks/evaluation.feature b/features/tasks/evaluation.feature index 51f0b6b..00f10f8 100644 --- a/features/tasks/evaluation.feature +++ b/features/tasks/evaluation.feature @@ -7,6 +7,5 @@ Feature: task evaluation puts 'hello from recipe' end """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain exactly "hello from recipe\n" diff --git a/features/tests/has_env.feature b/features/tests/has_env.feature index 817ef72..9fd4f69 100644 --- a/features/tests/has_env.feature +++ b/features/tests/has_env.feature @@ -12,8 +12,7 @@ Feature: `has_env' condition keyword echo 'evaluated' end """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must contain "evaluated" Scenario: fails when remote environment variable is not defined @@ -27,6 +26,5 @@ Feature: `has_env' condition keyword echo 'evaluated' end """ - When I execute the recipe - Then the exit status must be 0 + When I successfully execute the recipe And the output must not contain "evaluated"