producer-core 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/recipe/registry.feature +11 -0
- data/lib/producer/core/task.rb +1 -0
- data/lib/producer/core/version.rb +1 -1
- data/spec/producer/core/task_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f750e0a3e7e1507d6ae506e7a225d36013e32a46
|
4
|
+
data.tar.gz: dd1936c1fca2cedd04e3526de0de5b6c0a20a540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 746ff40b2247ebaafe28ed7c1ce080a70bd079ae3ddb31fb90f38e49e19f2e9344218b0c5f1923eb392ac6f0e81b9c3bac08dbb03805abbcb6d42067965e7086
|
7
|
+
data.tar.gz: cf618dde3593f0e0da83f4c3cdce8cef3896610bea5a42cfd5c5cc04aa4229b80ce15be530482449d716c7e0581b5bd38d2a6d475da57bef8da5520dc25e956e
|
@@ -57,6 +57,17 @@ Feature: key/value registry
|
|
57
57
|
When I successfully execute the recipe
|
58
58
|
Then the output must contain "some_value"
|
59
59
|
|
60
|
+
Scenario: `set' keyword sets a value from a task
|
61
|
+
Given a recipe with:
|
62
|
+
"""
|
63
|
+
task :registry_testing do
|
64
|
+
set :some_key, 'some_value'
|
65
|
+
echo get :some_key
|
66
|
+
end
|
67
|
+
"""
|
68
|
+
When I successfully execute the recipe
|
69
|
+
Then the output must contain "some_value"
|
70
|
+
|
60
71
|
Scenario: `set?' keyword tests wether given key is defined
|
61
72
|
Given a recipe with:
|
62
73
|
"""
|
data/lib/producer/core/task.rb
CHANGED
@@ -152,6 +152,13 @@ module Producer::Core
|
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
+
describe '#set' do
|
156
|
+
it 'sets a value in the registry' do
|
157
|
+
task.set :some_key, :some_value
|
158
|
+
expect(task.get :some_key).to eq :some_value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
155
162
|
describe '#get' do
|
156
163
|
before { env[:some_key] = :some_value }
|
157
164
|
|