use_context 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/use_context/version.rb +1 -1
- data/lib/use_context.rb +1 -1
- data/test/kernel_test.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90aac299a67f5dbfbb1e2580c29021dafdd1ba06e0c4e6771a15faa6a673a3dc
|
4
|
+
data.tar.gz: 4241b82b90fb4c902bae71dc2609f4651dc2eaf3ccd3cea1bddc54d08fdc1916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7527e2b3c96f0470f4997bd366d3b8071f4a17a07b00d101e2fa6b868fa435a54e991fdd6997594374a989dd16b9dadd8deea1c1806da09749dd16307fd6b053
|
7
|
+
data.tar.gz: 9d23e93d4ff8c0c85c7d618fd2d38f2d46617fd048ba2ec39069fb3f0d529c1caba5f8cef50dd7d80eacc3087385096fc548f771d2f6827fb04a062f1042892c
|
data/CHANGELOG.md
CHANGED
data/lib/use_context/version.rb
CHANGED
data/lib/use_context.rb
CHANGED
data/test/kernel_test.rb
CHANGED
@@ -101,6 +101,14 @@ class KernelTest < Minitest::Test
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
+
def test_use_context_can_extract_given_key
|
105
|
+
provide_context(:test, { setting1: :a, setting2: :b }) do
|
106
|
+
use_context(:test, :setting1) do |setting1|
|
107
|
+
assert_equal :a, setting1
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
104
112
|
def test_use_context_can_extract_given_keys
|
105
113
|
provide_context(:test, { setting1: :a, setting2: :b }) do
|
106
114
|
use_context(:test, :setting1, :setting2) do |setting1, setting2|
|