Refactor `source' recipe keyword feature
This commit is contained in:
parent
bc0ea65316
commit
cd13cebfd8
@ -1,11 +1,13 @@
|
|||||||
Feature: `source' recipe keyword
|
Feature: `source' recipe keyword
|
||||||
|
|
||||||
Scenario: requires a recipe file
|
Background:
|
||||||
Given a recipe with:
|
Given a recipe with:
|
||||||
"""
|
"""
|
||||||
source 'sourced_recipe'
|
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'
|
puts 'sourced recipe'
|
||||||
"""
|
"""
|
||||||
@ -14,14 +16,9 @@ Feature: `source' recipe keyword
|
|||||||
And the output must contain "sourced recipe"
|
And the output must contain "sourced recipe"
|
||||||
|
|
||||||
Scenario: reports errors from sourced recipes
|
Scenario: reports errors from sourced recipes
|
||||||
Given a recipe with:
|
Given a file named "sourced_recipe.rb" with:
|
||||||
"""
|
|
||||||
source 'sourced_recipe'
|
|
||||||
"""
|
|
||||||
And a file named "sourced_recipe.rb" with:
|
|
||||||
"""
|
"""
|
||||||
puts 'OK'
|
puts 'OK'
|
||||||
|
|
||||||
invalid_keyword
|
invalid_keyword
|
||||||
"""
|
"""
|
||||||
When I execute the recipe
|
When I execute the recipe
|
||||||
@ -29,6 +26,6 @@ Feature: `source' recipe keyword
|
|||||||
Then the output must match:
|
Then the output must match:
|
||||||
"""
|
"""
|
||||||
\AOK
|
\AOK
|
||||||
sourced_recipe.rb:3:.+invalid recipe keyword `invalid_keyword'
|
sourced_recipe.rb:2:.+invalid recipe keyword `invalid_keyword'
|
||||||
recipe.rb:1:.+
|
recipe.rb:1:.+
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user