fedux_org-stdlib 0.10.7 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fedux_org_stdlib/version.rb +1 -1
- data/spec/app_config_spec.rb +17 -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: 02d85b8d2701c92a7193843b05410e085d0cb353
|
4
|
+
data.tar.gz: e9a338e329ea1dfde4f5bf35111afec1bbd92f15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b54f3924f8eb0e713d7a33c59ed3174426afddd904d3ba71b433a538c6dea089f3ebfa101409a846c948f5256d1d687918f7168f4902ed94ed381fd1e51496d7
|
7
|
+
data.tar.gz: 15f9282347bf69285e7e8e07c007608fd89f9e09043d79f102496a07943737d44c3fb1bdd82e3cd584d9a1bc67121965995e63f11ee2e95ababf341f8dc371d5
|
data/Gemfile.lock
CHANGED
data/spec/app_config_spec.rb
CHANGED
@@ -25,6 +25,23 @@ RSpec.describe AppConfig do
|
|
25
25
|
expect(config.opt1).to eq 'blub'
|
26
26
|
end
|
27
27
|
|
28
|
+
it 'returns the same default value everytime' do
|
29
|
+
config_klass = Class.new(AppConfig) do
|
30
|
+
option :opt1, (1..10_000).to_a.sample
|
31
|
+
|
32
|
+
def _class_name
|
33
|
+
'TestConfig'
|
34
|
+
end
|
35
|
+
|
36
|
+
def _module_name
|
37
|
+
'MyApplication'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
config = config_klass.new
|
42
|
+
expect(config.opt1).to eq config.opt1
|
43
|
+
end
|
44
|
+
|
28
45
|
it 'creates readers' do
|
29
46
|
config_klass = Class.new(AppConfig) do
|
30
47
|
option_reader :opt1, nil
|