module-cluster 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +146 -1
- data/README.rdoc +146 -1
- data/lib/module-cluster.rb +54 -12
- data/lib/module-cluster/ModuleCluster/Define/Block.rb +3 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +16 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +63 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +2 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +63 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +32 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +16 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +63 -0
- data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +200 -0
- data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +127 -0
- data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +7 -19
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +5 -20
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +9 -26
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +9 -26
- data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +46 -0
- data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +200 -0
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +208 -0
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +127 -0
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +54 -0
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +44 -0
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +209 -0
- data/lib/module-cluster/{ModuleCluster → _private_/ModuleCluster}/ClusterStack.rb +0 -2
- data/lib/module-cluster/{ModuleCluster → _private_/ModuleCluster}/ClusterStack/Block.rb +1 -2
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +36 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +20 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +36 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +2 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +108 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +84 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +108 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +84 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +7 -0
- data/lib/module-cluster/{ModuleCluster → _private_/ModuleCluster}/ExtendForCascade.rb +0 -0
- data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +230 -0
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +238 -0
- data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +231 -0
- data/spec/ModuleCluster/Define/Block/Class_spec.rb +224 -0
- data/spec/ModuleCluster/Define/Block/Instance_spec.rb +78 -0
- data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +54 -0
- data/spec/ModuleCluster/Define/Block/Module_spec.rb +224 -0
- data/spec/ModuleCluster/Define/Block_spec.rb +18 -0
- data/spec/ModuleCluster/Define/ClassCluster_spec.rb +728 -0
- data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +576 -0
- data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +298 -60
- data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +307 -61
- data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +335 -36
- data/spec/ModuleCluster/Define/Cluster_spec.rb +447 -14
- data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +102 -0
- data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +728 -0
- data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +728 -0
- data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +576 -0
- data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +278 -0
- metadata +42 -13
- data/lib/module-cluster/ModuleCluster/CascadeFeatures.rb +0 -197
- data/lib/module-cluster/ModuleCluster/ClusterStack/Block/Class.rb +0 -36
- data/lib/module-cluster/ModuleCluster/ClusterStack/Block/Module.rb +0 -36
- data/lib/module-cluster/ModuleCluster/ClusterStack/Extends.rb +0 -29
- data/lib/module-cluster/ModuleCluster/ClusterStack/Includes.rb +0 -28
- data/lib/module-cluster/ModuleCluster/ClusterStack/PrependsExtends.rb +0 -28
- data/lib/module-cluster/ModuleCluster/ClusterStack/PrependsIncludes.rb +0 -28
- data/lib/module-cluster/ModuleCluster/Define/ClusterStack.rb +0 -26
@@ -3,6 +3,16 @@ require_relative '../../../lib/module-cluster.rb'
|
|
3
3
|
|
4
4
|
describe ModuleCluster::Define::ClusterCascadesToModule do
|
5
5
|
|
6
|
+
##########################
|
7
|
+
# self.should_cascade? #
|
8
|
+
##########################
|
9
|
+
|
10
|
+
it 'should cascade to modules' do
|
11
|
+
ModuleCluster::Define::ClusterCascadesToModule.should_cascade?( Kernel ).should == true
|
12
|
+
ModuleCluster::Define::ClusterCascadesToModule.should_cascade?( Class ).should == false
|
13
|
+
ModuleCluster::Define::ClusterCascadesToModule.should_cascade?( Object.new ).should == false
|
14
|
+
end
|
15
|
+
|
6
16
|
#########################################
|
7
17
|
# include_cascades_includes_to_module #
|
8
18
|
#########################################
|
@@ -16,21 +26,38 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
16
26
|
end
|
17
27
|
include_cascades_includes_to_module( Module1, Module2 )
|
18
28
|
respond_to?( :included ).should == true
|
19
|
-
module
|
29
|
+
module ModuleProof1
|
20
30
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock01
|
21
31
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == true
|
22
32
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == true
|
33
|
+
eigenclass = class << self ; self ; end
|
34
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == false
|
35
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == false
|
36
|
+
end
|
37
|
+
class ClassProof
|
38
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock01
|
39
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == false
|
40
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == false
|
41
|
+
eigenclass = class << self ; self ; end
|
42
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == false
|
43
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == false
|
23
44
|
end
|
24
|
-
module
|
25
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock01::
|
45
|
+
module ModuleProof2
|
46
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock01::ModuleProof1
|
26
47
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == true
|
27
48
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == true
|
49
|
+
eigenclass = class << self ; self ; end
|
50
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == false
|
51
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == false
|
28
52
|
end
|
29
|
-
class
|
30
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock01::
|
53
|
+
class ClassProof2
|
54
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock01::ModuleProof1
|
31
55
|
# true b/c of ancestor chain
|
32
56
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == true
|
33
57
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == true
|
58
|
+
eigenclass = class << self ; self ; end
|
59
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module1 ).should == false
|
60
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock01::Module2 ).should == false
|
34
61
|
end
|
35
62
|
end
|
36
63
|
end
|
@@ -48,20 +75,34 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
48
75
|
end
|
49
76
|
include_cascades_extends_to_module( Module1, Module2 )
|
50
77
|
respond_to?( :included ).should == true
|
51
|
-
module
|
78
|
+
module ModuleProof1
|
52
79
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock02
|
80
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
81
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
53
82
|
eigenclass = class << self ; self ; end
|
54
83
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == true
|
55
84
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == true
|
56
85
|
end
|
57
|
-
|
58
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock02
|
86
|
+
class ClassProof
|
87
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock02
|
88
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
89
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
90
|
+
eigenclass = class << self ; self ; end
|
91
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
92
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
93
|
+
end
|
94
|
+
module ModuleProof2
|
95
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock02::ModuleProof1
|
96
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
97
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
59
98
|
eigenclass = class << self ; self ; end
|
60
99
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == true
|
61
100
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == true
|
62
101
|
end
|
63
|
-
class
|
64
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock02::
|
102
|
+
class ClassProof2
|
103
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock02::ModuleProof1
|
104
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
105
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
65
106
|
eigenclass = class << self ; self ; end
|
66
107
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module1 ).should == false
|
67
108
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock02::Module2 ).should == false
|
@@ -82,7 +123,7 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
82
123
|
end
|
83
124
|
include_cascades_includes_and_extends_to_module( Module1, Module2 )
|
84
125
|
respond_to?( :included ).should == true
|
85
|
-
module
|
126
|
+
module ModuleProof1
|
86
127
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock03
|
87
128
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == true
|
88
129
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == true
|
@@ -90,16 +131,24 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
90
131
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == true
|
91
132
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == true
|
92
133
|
end
|
93
|
-
|
94
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock03
|
134
|
+
class ClassProof
|
135
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock03
|
136
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == false
|
137
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == false
|
138
|
+
eigenclass = class << self ; self ; end
|
139
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == false
|
140
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == false
|
141
|
+
end
|
142
|
+
module ModuleProof2
|
143
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock03::ModuleProof1
|
95
144
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == true
|
96
145
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == true
|
97
146
|
eigenclass = class << self ; self ; end
|
98
147
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == true
|
99
148
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == true
|
100
149
|
end
|
101
|
-
class
|
102
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock03::
|
150
|
+
class ClassProof2
|
151
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock03::ModuleProof1
|
103
152
|
# true b/c of ancestor chain
|
104
153
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module1 ).should == true
|
105
154
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock03::Module2 ).should == true
|
@@ -123,20 +172,52 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
123
172
|
end
|
124
173
|
extend_cascades_includes_to_module( Module1, Module2 )
|
125
174
|
respond_to?( :extended ).should == true
|
126
|
-
module
|
175
|
+
module ModuleProof1
|
127
176
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04
|
128
177
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == true
|
129
178
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == true
|
179
|
+
eigenclass = class << self ; self ; end
|
180
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == false
|
181
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == false
|
182
|
+
end
|
183
|
+
class ClassProof
|
184
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04
|
185
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == false
|
186
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == false
|
187
|
+
eigenclass = class << self ; self ; end
|
188
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == false
|
189
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == false
|
130
190
|
end
|
131
|
-
|
132
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04
|
191
|
+
Object.new.instance_eval do
|
192
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04
|
193
|
+
eigenclass = class << self ; self ; end
|
194
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == false
|
195
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == false
|
196
|
+
end
|
197
|
+
module ModuleProof2
|
198
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04::ModuleProof1
|
133
199
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == true
|
134
200
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == true
|
201
|
+
eigenclass = class << self ; self ; end
|
202
|
+
# true because of ancestor chain
|
203
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == true
|
204
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == true
|
135
205
|
end
|
136
|
-
class
|
137
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04::
|
206
|
+
class ClassProof2
|
207
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04::ModuleProof1
|
138
208
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == false
|
139
209
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == false
|
210
|
+
eigenclass = class << self ; self ; end
|
211
|
+
# true because of ancestor chain
|
212
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == true
|
213
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == true
|
214
|
+
end
|
215
|
+
Object.new.instance_eval do
|
216
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock04::ModuleProof1
|
217
|
+
eigenclass = class << self ; self ; end
|
218
|
+
# true because of ancestor chain
|
219
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module1 ).should == true
|
220
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock04::Module2 ).should == true
|
140
221
|
end
|
141
222
|
end
|
142
223
|
end
|
@@ -154,20 +235,46 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
154
235
|
end
|
155
236
|
extend_cascades_extends_to_module( Module1, Module2 )
|
156
237
|
respond_to?( :extended ).should == true
|
157
|
-
module
|
238
|
+
module ModuleProof1
|
158
239
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05
|
240
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
241
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
159
242
|
eigenclass = class << self ; self ; end
|
160
243
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == true
|
161
244
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == true
|
162
245
|
end
|
163
|
-
|
164
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05
|
246
|
+
class ClassProof
|
247
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05
|
248
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
249
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
250
|
+
eigenclass = class << self ; self ; end
|
251
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
252
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
253
|
+
end
|
254
|
+
Object.new.instance_eval do
|
255
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05
|
256
|
+
eigenclass = class << self ; self ; end
|
257
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
258
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
259
|
+
end
|
260
|
+
module ModuleProof2
|
261
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05::ModuleProof1
|
262
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
263
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
165
264
|
eigenclass = class << self ; self ; end
|
166
265
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == true
|
167
266
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == true
|
168
267
|
end
|
169
|
-
class
|
170
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05::
|
268
|
+
class ClassProof2
|
269
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05::ModuleProof1
|
270
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
271
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
272
|
+
eigenclass = class << self ; self ; end
|
273
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
274
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
275
|
+
end
|
276
|
+
Object.new.instance_eval do
|
277
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock05::ModuleProof1
|
171
278
|
eigenclass = class << self ; self ; end
|
172
279
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module1 ).should == false
|
173
280
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock05::Module2 ).should == false
|
@@ -188,7 +295,7 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
188
295
|
end
|
189
296
|
extend_cascades_includes_and_extends_to_module( Module1, Module2 )
|
190
297
|
respond_to?( :extended ).should == true
|
191
|
-
module
|
298
|
+
module ModuleProof1
|
192
299
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06
|
193
300
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
194
301
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
@@ -196,16 +303,30 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
196
303
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
197
304
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
198
305
|
end
|
199
|
-
|
200
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06
|
306
|
+
class ClassProof
|
307
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06
|
308
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == false
|
309
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == false
|
310
|
+
eigenclass = class << self ; self ; end
|
311
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == false
|
312
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == false
|
313
|
+
end
|
314
|
+
Object.new.instance_eval do
|
315
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06
|
316
|
+
eigenclass = class << self ; self ; end
|
317
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == false
|
318
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == false
|
319
|
+
end
|
320
|
+
module ModuleProof2
|
321
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06::ModuleProof1
|
201
322
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
202
323
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
203
324
|
eigenclass = class << self ; self ; end
|
204
325
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
205
326
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
206
327
|
end
|
207
|
-
class
|
208
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06::
|
328
|
+
class ClassProof2
|
329
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06::ModuleProof1
|
209
330
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == false
|
210
331
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == false
|
211
332
|
eigenclass = class << self ; self ; end
|
@@ -213,6 +334,13 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
213
334
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
214
335
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
215
336
|
end
|
337
|
+
Object.new.instance_eval do
|
338
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock06::ModuleProof1
|
339
|
+
eigenclass = class << self ; self ; end
|
340
|
+
# true because Proof2's ancestor chain includes
|
341
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module1 ).should == true
|
342
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock06::Module2 ).should == true
|
343
|
+
end
|
216
344
|
end
|
217
345
|
end
|
218
346
|
|
@@ -229,21 +357,38 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
229
357
|
end
|
230
358
|
include_cascades_to_module_prepending_includes( Module1, Module2 )
|
231
359
|
respond_to?( :append_features ).should == true
|
232
|
-
module
|
360
|
+
module ModuleProof1
|
233
361
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock07
|
234
362
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == true
|
235
363
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == true
|
364
|
+
eigenclass = class << self ; self ; end
|
365
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == false
|
366
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == false
|
236
367
|
end
|
237
|
-
|
238
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock07
|
368
|
+
class ClassProof
|
369
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock07
|
370
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == false
|
371
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == false
|
372
|
+
eigenclass = class << self ; self ; end
|
373
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == false
|
374
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == false
|
375
|
+
end
|
376
|
+
module ModuleProof2
|
377
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock07::ModuleProof1
|
239
378
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == true
|
240
379
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == true
|
380
|
+
eigenclass = class << self ; self ; end
|
381
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == false
|
382
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == false
|
241
383
|
end
|
242
|
-
class
|
243
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock07::
|
384
|
+
class ClassProof2
|
385
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock07::ModuleProof1
|
244
386
|
# true b/c of ancestor chain
|
245
387
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == true
|
246
388
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == true
|
389
|
+
eigenclass = class << self ; self ; end
|
390
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module1 ).should == false
|
391
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock07::Module2 ).should == false
|
247
392
|
end
|
248
393
|
end
|
249
394
|
end
|
@@ -261,20 +406,34 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
261
406
|
end
|
262
407
|
include_cascades_to_module_prepending_extends( Module1, Module2 )
|
263
408
|
respond_to?( :append_features ).should == true
|
264
|
-
module
|
409
|
+
module ModuleProof1
|
265
410
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock08
|
411
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
412
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
266
413
|
eigenclass = class << self ; self ; end
|
267
414
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == true
|
268
415
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == true
|
269
416
|
end
|
270
|
-
|
271
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock08
|
417
|
+
class ClassProof
|
418
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock08
|
419
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
420
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
421
|
+
eigenclass = class << self ; self ; end
|
422
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
423
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
424
|
+
end
|
425
|
+
module ModuleProof2
|
426
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock08::ModuleProof1
|
427
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
428
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
272
429
|
eigenclass = class << self ; self ; end
|
273
430
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == true
|
274
431
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == true
|
275
432
|
end
|
276
|
-
class
|
277
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock08::
|
433
|
+
class ClassProof2
|
434
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock08::ModuleProof1
|
435
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
436
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
278
437
|
eigenclass = class << self ; self ; end
|
279
438
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module1 ).should == false
|
280
439
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock08::Module2 ).should == false
|
@@ -295,7 +454,7 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
295
454
|
end
|
296
455
|
include_cascades_to_module_prepending_includes_and_extends( Module1, Module2 )
|
297
456
|
respond_to?( :append_features ).should == true
|
298
|
-
module
|
457
|
+
module ModuleProof1
|
299
458
|
include ModuleCluster::Define::ClusterCascadesToModule::Mock09
|
300
459
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == true
|
301
460
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == true
|
@@ -303,16 +462,24 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
303
462
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == true
|
304
463
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == true
|
305
464
|
end
|
306
|
-
|
307
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock09
|
465
|
+
class ClassProof
|
466
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock09
|
467
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == false
|
468
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == false
|
469
|
+
eigenclass = class << self ; self ; end
|
470
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == false
|
471
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == false
|
472
|
+
end
|
473
|
+
module ModuleProof2
|
474
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock09::ModuleProof1
|
308
475
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == true
|
309
476
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == true
|
310
477
|
eigenclass = class << self ; self ; end
|
311
478
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == true
|
312
479
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == true
|
313
480
|
end
|
314
|
-
class
|
315
|
-
include ModuleCluster::Define::ClusterCascadesToModule::Mock09::
|
481
|
+
class ClassProof2
|
482
|
+
include ModuleCluster::Define::ClusterCascadesToModule::Mock09::ModuleProof1
|
316
483
|
# true b/c of ancestor chain
|
317
484
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module1 ).should == true
|
318
485
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock09::Module2 ).should == true
|
@@ -336,20 +503,52 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
336
503
|
end
|
337
504
|
extend_cascades_to_module_prepending_includes( Module1, Module2 )
|
338
505
|
respond_to?( :extend_object ).should == true
|
339
|
-
module
|
506
|
+
module ModuleProof1
|
340
507
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10
|
341
508
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == true
|
342
509
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == true
|
510
|
+
eigenclass = class << self ; self ; end
|
511
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == false
|
512
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == false
|
513
|
+
end
|
514
|
+
class ClassProof
|
515
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10
|
516
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == false
|
517
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == false
|
518
|
+
eigenclass = class << self ; self ; end
|
519
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == false
|
520
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == false
|
343
521
|
end
|
344
|
-
|
345
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10
|
522
|
+
Object.new.instance_eval do
|
523
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10
|
524
|
+
eigenclass = class << self ; self ; end
|
525
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == false
|
526
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == false
|
527
|
+
end
|
528
|
+
module ModuleProof2
|
529
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10::ModuleProof1
|
346
530
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == true
|
347
531
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == true
|
532
|
+
eigenclass = class << self ; self ; end
|
533
|
+
# true because of ancestor chain
|
534
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == true
|
535
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == true
|
348
536
|
end
|
349
|
-
class
|
350
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10::
|
537
|
+
class ClassProof2
|
538
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10::ModuleProof1
|
351
539
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == false
|
352
540
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == false
|
541
|
+
eigenclass = class << self ; self ; end
|
542
|
+
# true because of ancestor chain
|
543
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == true
|
544
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == true
|
545
|
+
end
|
546
|
+
Object.new.instance_eval do
|
547
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock10::ModuleProof1
|
548
|
+
eigenclass = class << self ; self ; end
|
549
|
+
# true because of ancestor chain
|
550
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module1 ).should == true
|
551
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock10::Module2 ).should == true
|
353
552
|
end
|
354
553
|
end
|
355
554
|
end
|
@@ -367,20 +566,46 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
367
566
|
end
|
368
567
|
extend_cascades_to_module_prepending_extends( Module1, Module2 )
|
369
568
|
respond_to?( :extend_object ).should == true
|
370
|
-
module
|
569
|
+
module ModuleProof1
|
371
570
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11
|
571
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
572
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
372
573
|
eigenclass = class << self ; self ; end
|
373
574
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == true
|
374
575
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == true
|
375
576
|
end
|
376
|
-
|
377
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11
|
577
|
+
class ClassProof
|
578
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11
|
579
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
580
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
581
|
+
eigenclass = class << self ; self ; end
|
582
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
583
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
584
|
+
end
|
585
|
+
Object.new.instance_eval do
|
586
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11
|
587
|
+
eigenclass = class << self ; self ; end
|
588
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
589
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
590
|
+
end
|
591
|
+
module ModuleProof2
|
592
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11::ModuleProof1
|
593
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
594
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
378
595
|
eigenclass = class << self ; self ; end
|
379
596
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == true
|
380
597
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == true
|
381
598
|
end
|
382
|
-
class
|
383
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11::
|
599
|
+
class ClassProof2
|
600
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11::ModuleProof1
|
601
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
602
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
603
|
+
eigenclass = class << self ; self ; end
|
604
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
605
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
606
|
+
end
|
607
|
+
Object.new.instance_eval do
|
608
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock11::ModuleProof1
|
384
609
|
eigenclass = class << self ; self ; end
|
385
610
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module1 ).should == false
|
386
611
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock11::Module2 ).should == false
|
@@ -401,7 +626,7 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
401
626
|
end
|
402
627
|
extend_cascades_to_module_prepending_includes_and_extends( Module1, Module2 )
|
403
628
|
respond_to?( :extend_object ).should == true
|
404
|
-
module
|
629
|
+
module ModuleProof1
|
405
630
|
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12
|
406
631
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
407
632
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
@@ -409,20 +634,41 @@ describe ModuleCluster::Define::ClusterCascadesToModule do
|
|
409
634
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
410
635
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
411
636
|
end
|
412
|
-
|
413
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12
|
637
|
+
class ClassProof
|
638
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12
|
639
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == false
|
640
|
+
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == false
|
641
|
+
eigenclass = class << self ; self ; end
|
642
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == false
|
643
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == false
|
644
|
+
end
|
645
|
+
Object.new.instance_eval do
|
646
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12
|
647
|
+
eigenclass = class << self ; self ; end
|
648
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == false
|
649
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == false
|
650
|
+
end
|
651
|
+
module ModuleProof2
|
652
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12::ModuleProof1
|
414
653
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
415
654
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
416
655
|
eigenclass = class << self ; self ; end
|
417
656
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
418
657
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
419
658
|
end
|
420
|
-
class
|
421
|
-
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12::
|
659
|
+
class ClassProof2
|
660
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12::ModuleProof1
|
422
661
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == false
|
423
662
|
ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == false
|
424
663
|
eigenclass = class << self ; self ; end
|
425
|
-
# true
|
664
|
+
# true because of ancestor chain
|
665
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
666
|
+
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
667
|
+
end
|
668
|
+
Object.new.instance_eval do
|
669
|
+
extend ModuleCluster::Define::ClusterCascadesToModule::Mock12::ModuleProof1
|
670
|
+
eigenclass = class << self ; self ; end
|
671
|
+
# true because of ancestor chain
|
426
672
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module1 ).should == true
|
427
673
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascadesToModule::Mock12::Module2 ).should == true
|
428
674
|
end
|