Implement set' and
get' recipe keywords:
`set' registers a value at given index in env registry, `get' retrieves a value at given index.
This commit is contained in:
21
features/recipes/registry.feature
Normal file
21
features/recipes/registry.feature
Normal file
@@ -0,0 +1,21 @@
|
||||
Feature: key/value registry
|
||||
|
||||
Scenario: `set' keyword registers a value in the registry
|
||||
Given a recipe with:
|
||||
"""
|
||||
set :some_key, 'some_value'
|
||||
|
||||
puts env.registry[:some_key]
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the output must contain "some_value"
|
||||
|
||||
Scenario: `get' keyword fetches a value from the registry
|
||||
Given a recipe with:
|
||||
"""
|
||||
set :some_key, 'some_value'
|
||||
|
||||
puts get :some_key
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the output must contain "some_value"
|
Reference in New Issue
Block a user