Fail when accessing registry with invalid key

This commit is contained in:
Thibault Jouan
2014-09-26 00:24:19 +00:00
parent ff30b7474c
commit 2d4e04b2e5
4 changed files with 20 additions and 1 deletions

View File

@@ -34,3 +34,15 @@ Feature: key/value registry
"""
When I successfully execute the recipe
Then the output must contain "some_value"
Scenario: `get' keyword should trigger an error when given invalid key
Given a recipe with:
"""
task :some_task do
echo get :no_key
echo 'after_fail'
end
"""
When I execute the recipe
Then the output must not contain "after_fail"
And the output must match /\A\w+Error:\s+:no_key/