From cd13cebfd8795cc03b4c2aeea7723929c5814d38 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Tue, 6 Aug 2013 19:00:14 +0000 Subject: [PATCH] Refactor `source' recipe keyword feature --- features/recipes/source.feature | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/features/recipes/source.feature b/features/recipes/source.feature index 5b8f3f5..7500292 100644 --- a/features/recipes/source.feature +++ b/features/recipes/source.feature @@ -1,11 +1,13 @@ Feature: `source' recipe keyword - Scenario: requires a recipe file + Background: Given a recipe with: """ source 'sourced_recipe' """ - And a file named "sourced_recipe.rb" with: + + Scenario: requires a recipe file + Given a file named "sourced_recipe.rb" with: """ puts 'sourced recipe' """ @@ -14,14 +16,9 @@ Feature: `source' recipe keyword And the output must contain "sourced recipe" Scenario: reports errors from sourced recipes - Given a recipe with: - """ - source 'sourced_recipe' - """ - And a file named "sourced_recipe.rb" with: + Given a file named "sourced_recipe.rb" with: """ puts 'OK' - invalid_keyword """ When I execute the recipe @@ -29,6 +26,6 @@ Feature: `source' recipe keyword Then the output must match: """ \AOK - sourced_recipe.rb:3:.+invalid recipe keyword `invalid_keyword' + sourced_recipe.rb:2:.+invalid recipe keyword `invalid_keyword' recipe.rb:1:.+ """