descendants_describable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c650c74f19a68bd2dcce7e7275f89bd71c95b86
|
4
|
+
data.tar.gz: c589dd0540996c8428088e099c42dc89166d137f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3bf3c5b27f2e8f096427b1cde262adbe25f0590a632a50e80111ac9050b9ce0b9147928e14e9f6128bd9f30ef51959e8c93bf430950e5b24681c0307ede0af
|
7
|
+
data.tar.gz: e218823dd0d83b50d3863505c77fe2d63d8129585726cb5a010d2a02018f03949a2b2bae95ae6197c43e921839c925fb07d1d3ed64253e8ae0aa671bfa88dfbb
|
@@ -25,6 +25,14 @@ class Model < ActiveRecord::Base
|
|
25
25
|
type :hadger do
|
26
26
|
is_a_witch
|
27
27
|
end
|
28
|
+
|
29
|
+
floats_like_a_duck do
|
30
|
+
type :tadger
|
31
|
+
end
|
32
|
+
|
33
|
+
is_a_witch do
|
34
|
+
type :madger
|
35
|
+
end
|
28
36
|
end
|
29
37
|
|
30
38
|
talks_like_a_duck do
|
@@ -43,7 +51,7 @@ describe DescendantsDescribable do
|
|
43
51
|
|
44
52
|
describe '.type - for subclass generation' do
|
45
53
|
it 'creates new subclass of each type' do
|
46
|
-
[Badger, Hadger, Fadger, Ladger].each do |klass|
|
54
|
+
[Badger, Hadger, Fadger, Ladger, Tadger].each do |klass|
|
47
55
|
expect(klass < Model).to be_true
|
48
56
|
end
|
49
57
|
end
|
@@ -60,6 +68,12 @@ describe DescendantsDescribable do
|
|
60
68
|
expect(Ladger < Models::Descriptors::FloatsLikeADuck).to be_true
|
61
69
|
expect(Ladger < Models::Descriptors::TalksLikeADuck).to be_true
|
62
70
|
expect(Ladger < Models::Descriptors::IsAWitch).to be_true
|
71
|
+
|
72
|
+
expect(Tadger < Models::Descriptors::FloatsLikeADuck).to be_true
|
73
|
+
expect(Tadger < Models::Descriptors::WalksLikeADuck).to be_true
|
74
|
+
|
75
|
+
expect(Madger < Models::Descriptors::WalksLikeADuck).to be_true
|
76
|
+
expect(Madger < Models::Descriptors::IsAWitch).to be_true
|
63
77
|
end
|
64
78
|
end
|
65
79
|
end
|