module-cluster 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/README.rdoc +4 -4
- data/lib/module-cluster.rb +19 -10
- data/lib/module-cluster/ModuleCluster.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +29 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +22 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +22 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +32 -5
- data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Status.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade/Subclass.rb +55 -8
- data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +55 -0
- data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +54 -0
- data/spec/ModuleCluster/Define/Block/Class_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/Instance_spec.rb +12 -12
- data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +53 -0
- data/spec/ModuleCluster/Define/Block/Module_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +39 -9
- data/spec/ModuleCluster/Define/ClassCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +60 -60
- data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +72 -72
- data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +72 -72
- data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +68 -68
- data/spec/ModuleCluster/Define/Cluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +8 -8
- data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +60 -60
- data/spec/ModuleCluster/Suspend/Hooks_spec.rb +14 -14
- data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +14 -14
- data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +6 -6
- data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +8 -8
- metadata +33 -29
@@ -19,7 +19,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
19
19
|
|
20
20
|
it 'include modules for any class or module this module is included in' do
|
21
21
|
module ModuleCluster::Define::ClusterCascades::Mock01
|
22
|
-
extend ModuleCluster::Define::ClusterCascades
|
22
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
23
23
|
module Module1
|
24
24
|
end
|
25
25
|
module Module2
|
@@ -27,7 +27,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
27
27
|
include_cascades_includes( Module1, Module2 ).name = :some_name
|
28
28
|
respond_to?( :included ).should == true
|
29
29
|
module ModuleProof1
|
30
|
-
include ModuleCluster::Define::ClusterCascades::Mock01
|
30
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock01
|
31
31
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module1 ).should == true
|
32
32
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == true
|
33
33
|
eigenclass = class << self ; self ; end
|
@@ -35,7 +35,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
35
35
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == false
|
36
36
|
end
|
37
37
|
class ClassProof
|
38
|
-
include ModuleCluster::Define::ClusterCascades::Mock01
|
38
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock01
|
39
39
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module1 ).should == true
|
40
40
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == true
|
41
41
|
eigenclass = class << self ; self ; end
|
@@ -43,7 +43,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
43
43
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == false
|
44
44
|
end
|
45
45
|
module ModuleProof2
|
46
|
-
include ModuleCluster::Define::ClusterCascades::Mock01::ModuleProof1
|
46
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock01::ModuleProof1
|
47
47
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module1 ).should == true
|
48
48
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == true
|
49
49
|
eigenclass = class << self ; self ; end
|
@@ -51,7 +51,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
51
51
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == false
|
52
52
|
end
|
53
53
|
class ClassProof2
|
54
|
-
include ModuleCluster::Define::ClusterCascades::Mock01::ModuleProof1
|
54
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock01::ModuleProof1
|
55
55
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module1 ).should == true
|
56
56
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock01::Module2 ).should == true
|
57
57
|
eigenclass = class << self ; self ; end
|
@@ -67,7 +67,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
67
67
|
|
68
68
|
it 'extends modules for any class or module this module is included in' do
|
69
69
|
module ModuleCluster::Define::ClusterCascades::Mock02
|
70
|
-
extend ModuleCluster::Define::ClusterCascades
|
70
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
71
71
|
module Module1
|
72
72
|
end
|
73
73
|
module Module2
|
@@ -75,7 +75,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
75
75
|
include_cascades_extends( Module1, Module2 ).name = :some_name
|
76
76
|
respond_to?( :included ).should == true
|
77
77
|
module ModuleProof1
|
78
|
-
include ModuleCluster::Define::ClusterCascades::Mock02
|
78
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock02
|
79
79
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module1 ).should == false
|
80
80
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == false
|
81
81
|
eigenclass = class << self ; self ; end
|
@@ -83,7 +83,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
83
83
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == true
|
84
84
|
end
|
85
85
|
class ClassProof
|
86
|
-
include ModuleCluster::Define::ClusterCascades::Mock02
|
86
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock02
|
87
87
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module1 ).should == false
|
88
88
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == false
|
89
89
|
eigenclass = class << self ; self ; end
|
@@ -91,7 +91,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
91
91
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == true
|
92
92
|
end
|
93
93
|
module ModuleProof2
|
94
|
-
include ModuleCluster::Define::ClusterCascades::Mock02::ModuleProof1
|
94
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock02::ModuleProof1
|
95
95
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module1 ).should == false
|
96
96
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == false
|
97
97
|
eigenclass = class << self ; self ; end
|
@@ -99,7 +99,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
99
99
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == true
|
100
100
|
end
|
101
101
|
class ClassProof2
|
102
|
-
include ModuleCluster::Define::ClusterCascades::Mock02::ModuleProof1
|
102
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock02::ModuleProof1
|
103
103
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module1 ).should == false
|
104
104
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock02::Module2 ).should == false
|
105
105
|
eigenclass = class << self ; self ; end
|
@@ -115,7 +115,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
115
115
|
|
116
116
|
it 'include and extends modules for any class or module this module is included in' do
|
117
117
|
module ModuleCluster::Define::ClusterCascades::Mock03
|
118
|
-
extend ModuleCluster::Define::ClusterCascades
|
118
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
119
119
|
module Module1
|
120
120
|
end
|
121
121
|
module Module2
|
@@ -123,7 +123,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
123
123
|
include_cascades_includes_and_extends( Module1, Module2 ).name = :some_name
|
124
124
|
respond_to?( :included ).should == true
|
125
125
|
module ModuleProof1
|
126
|
-
include ModuleCluster::Define::ClusterCascades::Mock03
|
126
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock03
|
127
127
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module1 ).should == true
|
128
128
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
129
129
|
eigenclass = class << self ; self ; end
|
@@ -131,7 +131,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
131
131
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
132
132
|
end
|
133
133
|
class ClassProof
|
134
|
-
include ModuleCluster::Define::ClusterCascades::Mock03
|
134
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock03
|
135
135
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module1 ).should == true
|
136
136
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
137
137
|
eigenclass = class << self ; self ; end
|
@@ -139,7 +139,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
139
139
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
140
140
|
end
|
141
141
|
module ModuleProof2
|
142
|
-
include ModuleCluster::Define::ClusterCascades::Mock03::ModuleProof1
|
142
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock03::ModuleProof1
|
143
143
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module1 ).should == true
|
144
144
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
145
145
|
eigenclass = class << self ; self ; end
|
@@ -147,7 +147,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
147
147
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
148
148
|
end
|
149
149
|
class ClassProof2
|
150
|
-
include ModuleCluster::Define::ClusterCascades::Mock03::ModuleProof1
|
150
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock03::ModuleProof1
|
151
151
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module1 ).should == true
|
152
152
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock03::Module2 ).should == true
|
153
153
|
eigenclass = class << self ; self ; end
|
@@ -163,7 +163,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
163
163
|
|
164
164
|
it 'include modules for any class or module this module is extended in' do
|
165
165
|
module ModuleCluster::Define::ClusterCascades::Mock04
|
166
|
-
extend ModuleCluster::Define::ClusterCascades
|
166
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
167
167
|
module Module1
|
168
168
|
end
|
169
169
|
module Module2
|
@@ -171,7 +171,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
171
171
|
extend_cascades_includes( Module1, Module2 ).name = :some_name
|
172
172
|
respond_to?( :extended ).should == true
|
173
173
|
module ModuleProof1
|
174
|
-
extend ModuleCluster::Define::ClusterCascades::Mock04
|
174
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock04
|
175
175
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module1 ).should == true
|
176
176
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == true
|
177
177
|
eigenclass = class << self ; self ; end
|
@@ -179,7 +179,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
179
179
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == false
|
180
180
|
end
|
181
181
|
class ClassProof
|
182
|
-
extend ModuleCluster::Define::ClusterCascades::Mock04
|
182
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock04
|
183
183
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module1 ).should == true
|
184
184
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == true
|
185
185
|
eigenclass = class << self ; self ; end
|
@@ -187,7 +187,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
187
187
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == false
|
188
188
|
end
|
189
189
|
module ModuleProof2
|
190
|
-
extend ModuleCluster::Define::ClusterCascades::Mock04::ModuleProof1
|
190
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock04::ModuleProof1
|
191
191
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module1 ).should == true
|
192
192
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == true
|
193
193
|
eigenclass = class << self ; self ; end
|
@@ -196,7 +196,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
196
196
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == true
|
197
197
|
end
|
198
198
|
class ClassProof2
|
199
|
-
extend ModuleCluster::Define::ClusterCascades::Mock04::ModuleProof1
|
199
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock04::ModuleProof1
|
200
200
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module1 ).should == true
|
201
201
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock04::Module2 ).should == true
|
202
202
|
eigenclass = class << self ; self ; end
|
@@ -213,7 +213,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
213
213
|
|
214
214
|
it 'extend modules for any class or module this module is extended in' do
|
215
215
|
module ModuleCluster::Define::ClusterCascades::Mock05
|
216
|
-
extend ModuleCluster::Define::ClusterCascades
|
216
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
217
217
|
module Module1
|
218
218
|
end
|
219
219
|
module Module2
|
@@ -221,7 +221,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
221
221
|
extend_cascades_extends( Module1, Module2 ).name = :some_name
|
222
222
|
respond_to?( :extended ).should == true
|
223
223
|
module ModuleProof1
|
224
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05
|
224
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05
|
225
225
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == false
|
226
226
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == false
|
227
227
|
eigenclass = class << self ; self ; end
|
@@ -229,7 +229,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
229
229
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
230
230
|
end
|
231
231
|
class ClassProof
|
232
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05
|
232
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05
|
233
233
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == false
|
234
234
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == false
|
235
235
|
eigenclass = class << self ; self ; end
|
@@ -237,13 +237,13 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
237
237
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
238
238
|
end
|
239
239
|
Object.new.instance_eval do
|
240
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05
|
240
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05
|
241
241
|
eigenclass = class << self ; self ; end
|
242
242
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == true
|
243
243
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
244
244
|
end
|
245
245
|
module ModuleProof2
|
246
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
246
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
247
247
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == false
|
248
248
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == false
|
249
249
|
eigenclass = class << self ; self ; end
|
@@ -251,7 +251,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
251
251
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
252
252
|
end
|
253
253
|
class ClassProof2
|
254
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
254
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
255
255
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == false
|
256
256
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == false
|
257
257
|
eigenclass = class << self ; self ; end
|
@@ -259,7 +259,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
259
259
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
260
260
|
end
|
261
261
|
Object.new.instance_eval do
|
262
|
-
extend ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
262
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock05::ModuleProof1
|
263
263
|
eigenclass = class << self ; self ; end
|
264
264
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module1 ).should == true
|
265
265
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock05::Module2 ).should == true
|
@@ -273,7 +273,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
273
273
|
|
274
274
|
it 'include and extend modules for any class or module this module is extended in' do
|
275
275
|
module ModuleCluster::Define::ClusterCascades::Mock06
|
276
|
-
extend ModuleCluster::Define::ClusterCascades
|
276
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
277
277
|
module Module1
|
278
278
|
end
|
279
279
|
module Module2
|
@@ -281,7 +281,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
281
281
|
extend_cascades_includes_and_extends( Module1, Module2 ).name = :some_name
|
282
282
|
respond_to?( :extended ).should == true
|
283
283
|
module ModuleProof1
|
284
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06
|
284
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06
|
285
285
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
286
286
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
287
287
|
eigenclass = class << self ; self ; end
|
@@ -289,7 +289,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
289
289
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
290
290
|
end
|
291
291
|
class ClassProof
|
292
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06
|
292
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06
|
293
293
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
294
294
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
295
295
|
eigenclass = class << self ; self ; end
|
@@ -297,13 +297,13 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
297
297
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
298
298
|
end
|
299
299
|
Object.new.instance_eval do
|
300
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06
|
300
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06
|
301
301
|
eigenclass = class << self ; self ; end
|
302
302
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
303
303
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
304
304
|
end
|
305
305
|
module ModuleProof2
|
306
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
306
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
307
307
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
308
308
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
309
309
|
eigenclass = class << self ; self ; end
|
@@ -311,7 +311,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
311
311
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
312
312
|
end
|
313
313
|
class ClassProof2
|
314
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
314
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
315
315
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
316
316
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
317
317
|
eigenclass = class << self ; self ; end
|
@@ -319,7 +319,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
319
319
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
320
320
|
end
|
321
321
|
Object.new.instance_eval do
|
322
|
-
extend ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
322
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock06::ModuleProof1
|
323
323
|
eigenclass = class << self ; self ; end
|
324
324
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module1 ).should == true
|
325
325
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock06::Module2 ).should == true
|
@@ -333,7 +333,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
333
333
|
|
334
334
|
it 'include other modules for any class or module this module is included in, before this module is included' do
|
335
335
|
module ModuleCluster::Define::ClusterCascades::Mock07
|
336
|
-
extend ModuleCluster::Define::ClusterCascades
|
336
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
337
337
|
module Module1
|
338
338
|
end
|
339
339
|
module Module2
|
@@ -341,7 +341,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
341
341
|
include_cascades_prepend_includes( Module1, Module2 ).name = :some_name
|
342
342
|
respond_to?( :append_features ).should == true
|
343
343
|
module ModuleProof1
|
344
|
-
include ModuleCluster::Define::ClusterCascades::Mock07
|
344
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock07
|
345
345
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module1 ).should == true
|
346
346
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == true
|
347
347
|
eigenclass = class << self ; self ; end
|
@@ -349,7 +349,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
349
349
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == false
|
350
350
|
end
|
351
351
|
class ClassProof
|
352
|
-
include ModuleCluster::Define::ClusterCascades::Mock07
|
352
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock07
|
353
353
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module1 ).should == true
|
354
354
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == true
|
355
355
|
eigenclass = class << self ; self ; end
|
@@ -357,7 +357,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
357
357
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == false
|
358
358
|
end
|
359
359
|
module ModuleProof2
|
360
|
-
include ModuleCluster::Define::ClusterCascades::Mock07::ModuleProof1
|
360
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock07::ModuleProof1
|
361
361
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module1 ).should == true
|
362
362
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == true
|
363
363
|
eigenclass = class << self ; self ; end
|
@@ -365,7 +365,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
365
365
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == false
|
366
366
|
end
|
367
367
|
class ClassProof2
|
368
|
-
include ModuleCluster::Define::ClusterCascades::Mock07::ModuleProof1
|
368
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock07::ModuleProof1
|
369
369
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module1 ).should == true
|
370
370
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock07::Module2 ).should == true
|
371
371
|
eigenclass = class << self ; self ; end
|
@@ -381,7 +381,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
381
381
|
|
382
382
|
it 'extend other modules for any class or module this module is included in, before this module is included' do
|
383
383
|
module ModuleCluster::Define::ClusterCascades::Mock08
|
384
|
-
extend ModuleCluster::Define::ClusterCascades
|
384
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
385
385
|
module Module1
|
386
386
|
end
|
387
387
|
module Module2
|
@@ -389,7 +389,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
389
389
|
include_cascades_prepend_extends( Module1, Module2 ).name = :some_name
|
390
390
|
respond_to?( :append_features ).should == true
|
391
391
|
module ModuleProof1
|
392
|
-
include ModuleCluster::Define::ClusterCascades::Mock08
|
392
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock08
|
393
393
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module1 ).should == false
|
394
394
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == false
|
395
395
|
eigenclass = class << self ; self ; end
|
@@ -397,7 +397,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
397
397
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == true
|
398
398
|
end
|
399
399
|
class ClassProof
|
400
|
-
include ModuleCluster::Define::ClusterCascades::Mock08
|
400
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock08
|
401
401
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module1 ).should == false
|
402
402
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == false
|
403
403
|
eigenclass = class << self ; self ; end
|
@@ -405,7 +405,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
405
405
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == true
|
406
406
|
end
|
407
407
|
module ModuleProof2
|
408
|
-
include ModuleCluster::Define::ClusterCascades::Mock08::ModuleProof1
|
408
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock08::ModuleProof1
|
409
409
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module1 ).should == false
|
410
410
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == false
|
411
411
|
eigenclass = class << self ; self ; end
|
@@ -413,7 +413,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
413
413
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == true
|
414
414
|
end
|
415
415
|
class ClassProof2
|
416
|
-
include ModuleCluster::Define::ClusterCascades::Mock08::ModuleProof1
|
416
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock08::ModuleProof1
|
417
417
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module1 ).should == false
|
418
418
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock08::Module2 ).should == false
|
419
419
|
eigenclass = class << self ; self ; end
|
@@ -429,7 +429,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
429
429
|
|
430
430
|
it 'include and extend other modules for any class or module this module is included in, before this module is included' do
|
431
431
|
module ModuleCluster::Define::ClusterCascades::Mock09
|
432
|
-
extend ModuleCluster::Define::ClusterCascades
|
432
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
433
433
|
module Module1
|
434
434
|
end
|
435
435
|
module Module2
|
@@ -437,7 +437,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
437
437
|
include_cascades_prepend_includes_and_extends( Module1, Module2 ).name = :some_name
|
438
438
|
respond_to?( :append_features ).should == true
|
439
439
|
module ModuleProof1
|
440
|
-
include ModuleCluster::Define::ClusterCascades::Mock09
|
440
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock09
|
441
441
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module1 ).should == true
|
442
442
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
443
443
|
eigenclass = class << self ; self ; end
|
@@ -445,7 +445,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
445
445
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
446
446
|
end
|
447
447
|
class ClassProof
|
448
|
-
include ModuleCluster::Define::ClusterCascades::Mock09
|
448
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock09
|
449
449
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module1 ).should == true
|
450
450
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
451
451
|
eigenclass = class << self ; self ; end
|
@@ -453,7 +453,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
453
453
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
454
454
|
end
|
455
455
|
module ModuleProof2
|
456
|
-
include ModuleCluster::Define::ClusterCascades::Mock09::ModuleProof1
|
456
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock09::ModuleProof1
|
457
457
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module1 ).should == true
|
458
458
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
459
459
|
eigenclass = class << self ; self ; end
|
@@ -461,7 +461,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
461
461
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
462
462
|
end
|
463
463
|
class ClassProof2
|
464
|
-
include ModuleCluster::Define::ClusterCascades::Mock09::ModuleProof1
|
464
|
+
include ::ModuleCluster::Define::ClusterCascades::Mock09::ModuleProof1
|
465
465
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module1 ).should == true
|
466
466
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock09::Module2 ).should == true
|
467
467
|
eigenclass = class << self ; self ; end
|
@@ -477,7 +477,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
477
477
|
|
478
478
|
it 'include other modules for any class or module this module is included in, before this module is extended' do
|
479
479
|
module ModuleCluster::Define::ClusterCascades::Mock10
|
480
|
-
extend ModuleCluster::Define::ClusterCascades
|
480
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
481
481
|
module Module1
|
482
482
|
end
|
483
483
|
module Module2
|
@@ -485,7 +485,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
485
485
|
extend_cascades_prepend_includes( Module1, Module2 ).name = :some_name
|
486
486
|
respond_to?( :extend_object ).should == true
|
487
487
|
module ModuleProof1
|
488
|
-
extend ModuleCluster::Define::ClusterCascades::Mock10
|
488
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock10
|
489
489
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module1 ).should == true
|
490
490
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == true
|
491
491
|
eigenclass = class << self ; self ; end
|
@@ -493,7 +493,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
493
493
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == false
|
494
494
|
end
|
495
495
|
class ClassProof
|
496
|
-
extend ModuleCluster::Define::ClusterCascades::Mock10
|
496
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock10
|
497
497
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module1 ).should == true
|
498
498
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == true
|
499
499
|
eigenclass = class << self ; self ; end
|
@@ -501,7 +501,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
501
501
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == false
|
502
502
|
end
|
503
503
|
module ModuleProof2
|
504
|
-
extend ModuleCluster::Define::ClusterCascades::Mock10::ModuleProof1
|
504
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock10::ModuleProof1
|
505
505
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module1 ).should == true
|
506
506
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == true
|
507
507
|
eigenclass = class << self ; self ; end
|
@@ -510,7 +510,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
510
510
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == true
|
511
511
|
end
|
512
512
|
class ClassProof2
|
513
|
-
extend ModuleCluster::Define::ClusterCascades::Mock10::ModuleProof1
|
513
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock10::ModuleProof1
|
514
514
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module1 ).should == true
|
515
515
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock10::Module2 ).should == true
|
516
516
|
eigenclass = class << self ; self ; end
|
@@ -527,7 +527,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
527
527
|
|
528
528
|
it 'extend other modules for any class or module this module is included in, before this module is extended' do
|
529
529
|
module ModuleCluster::Define::ClusterCascades::Mock11
|
530
|
-
extend ModuleCluster::Define::ClusterCascades
|
530
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
531
531
|
module Module1
|
532
532
|
end
|
533
533
|
module Module2
|
@@ -535,7 +535,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
535
535
|
extend_cascades_prepend_extends( Module1, Module2 ).name = :some_name
|
536
536
|
respond_to?( :extend_object ).should == true
|
537
537
|
module ModuleProof1
|
538
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11
|
538
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11
|
539
539
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == false
|
540
540
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == false
|
541
541
|
eigenclass = class << self ; self ; end
|
@@ -543,7 +543,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
543
543
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
544
544
|
end
|
545
545
|
class ClassProof
|
546
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11
|
546
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11
|
547
547
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == false
|
548
548
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == false
|
549
549
|
eigenclass = class << self ; self ; end
|
@@ -551,13 +551,13 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
551
551
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
552
552
|
end
|
553
553
|
Object.new.instance_eval do
|
554
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11
|
554
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11
|
555
555
|
eigenclass = class << self ; self ; end
|
556
556
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == true
|
557
557
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
558
558
|
end
|
559
559
|
module ModuleProof2
|
560
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
560
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
561
561
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == false
|
562
562
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == false
|
563
563
|
eigenclass = class << self ; self ; end
|
@@ -565,7 +565,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
565
565
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
566
566
|
end
|
567
567
|
class ClassProof2
|
568
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
568
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
569
569
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == false
|
570
570
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == false
|
571
571
|
eigenclass = class << self ; self ; end
|
@@ -573,7 +573,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
573
573
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
574
574
|
end
|
575
575
|
Object.new.instance_eval do
|
576
|
-
extend ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
576
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock11::ModuleProof1
|
577
577
|
eigenclass = class << self ; self ; end
|
578
578
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module1 ).should == true
|
579
579
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock11::Module2 ).should == true
|
@@ -587,7 +587,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
587
587
|
|
588
588
|
it 'include and extend other modules for any class or module this module is included in, before this module is extended' do
|
589
589
|
module ModuleCluster::Define::ClusterCascades::Mock12
|
590
|
-
extend ModuleCluster::Define::ClusterCascades
|
590
|
+
extend ::ModuleCluster::Define::ClusterCascades
|
591
591
|
module Module1
|
592
592
|
end
|
593
593
|
module Module2
|
@@ -595,7 +595,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
595
595
|
extend_cascades_prepend_includes_and_extends( Module1, Module2 ).name = :some_name
|
596
596
|
respond_to?( :extend_object ).should == true
|
597
597
|
module ModuleProof1
|
598
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12
|
598
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12
|
599
599
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
600
600
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
601
601
|
eigenclass = class << self ; self ; end
|
@@ -603,7 +603,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
603
603
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
604
604
|
end
|
605
605
|
class ClassProof
|
606
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12
|
606
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12
|
607
607
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
608
608
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
609
609
|
eigenclass = class << self ; self ; end
|
@@ -611,13 +611,13 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
611
611
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
612
612
|
end
|
613
613
|
Object.new.instance_eval do
|
614
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12
|
614
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12
|
615
615
|
eigenclass = class << self ; self ; end
|
616
616
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
617
617
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
618
618
|
end
|
619
619
|
module ModuleProof2
|
620
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
620
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
621
621
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
622
622
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
623
623
|
eigenclass = class << self ; self ; end
|
@@ -625,7 +625,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
625
625
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
626
626
|
end
|
627
627
|
class ClassProof
|
628
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
628
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
629
629
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
630
630
|
ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
631
631
|
eigenclass = class << self ; self ; end
|
@@ -633,7 +633,7 @@ describe ModuleCluster::Define::ClusterCascades do
|
|
633
633
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|
634
634
|
end
|
635
635
|
Object.new.instance_eval do
|
636
|
-
extend ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
636
|
+
extend ::ModuleCluster::Define::ClusterCascades::Mock12::ModuleProof1
|
637
637
|
eigenclass = class << self ; self ; end
|
638
638
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module1 ).should == true
|
639
639
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClusterCascades::Mock12::Module2 ).should == true
|