smart_properties 1.16.2 → 1.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smart_properties/version.rb +1 -1
- data/lib/smart_properties.rb +1 -1
- data/spec/inheritance_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cab5fbc87f1af758c2b385feaed5c43cf2f7555f2f55322e1bbbfe47771a42d
|
4
|
+
data.tar.gz: a79f9fd570f548895fcd3cc4d65e7f6ba614692f0671e09ce70be6704b49428a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42c3abfd70e12c52f185a49d6ccb2bfe4429a52eab2d18e8613058bc5687d6c525ac3ad3d5eaab75c1cbe092536673bb2c675d5adc2e26759a8a824e0ff4a096
|
7
|
+
data.tar.gz: 21eb0b7ab6ab434f512525f5a36fbf07c0a79ce53173c4c417ee379b52de737a4db1baf226019bc4d0eb813e2f7e6a502101f6674d6ba5703bc671bee1fd385c
|
data/lib/smart_properties.rb
CHANGED
data/spec/inheritance_spec.rb
CHANGED
@@ -265,6 +265,24 @@ RSpec.describe SmartProperties, 'intheritance' do
|
|
265
265
|
expect { klass.new(m: 4, n: 5, p: 6) }.to_not raise_error
|
266
266
|
end
|
267
267
|
|
268
|
+
it "always extends module with ModuleMethods but never classes" do
|
269
|
+
n = self.n
|
270
|
+
|
271
|
+
klass = Class.new do
|
272
|
+
include n
|
273
|
+
end
|
274
|
+
|
275
|
+
module_singleton_class_ancestors = n.singleton_class.ancestors
|
276
|
+
|
277
|
+
expect(module_singleton_class_ancestors).to include(SmartProperties::ClassMethods)
|
278
|
+
expect(module_singleton_class_ancestors).to include(SmartProperties::ModuleMethods)
|
279
|
+
|
280
|
+
singleton_class_ancestors = klass.singleton_class.ancestors
|
281
|
+
|
282
|
+
expect(singleton_class_ancestors).to include(SmartProperties::ClassMethods)
|
283
|
+
expect(singleton_class_ancestors).not_to include(SmartProperties::ModuleMethods)
|
284
|
+
end
|
285
|
+
|
268
286
|
it "yields properly ordered properties – child properties have higher precedence than parent properties" do
|
269
287
|
n = self.n
|
270
288
|
m = self.m
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_properties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Tennhard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|