module-cluster 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. data/README.md +54 -156
  2. data/README.rdoc +54 -130
  3. data/lib/module-cluster.rb +20 -16
  4. data/lib/module-cluster/ModuleCluster.rb +4 -120
  5. data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +40 -0
  6. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +140 -0
  7. data/lib/module-cluster/ModuleCluster/Define/ModuleClusterCascades.rb +140 -0
  8. data/lib/module-cluster/ModuleCluster/Define/ModuleClusterCascadesToClass.rb +140 -0
  9. data/lib/module-cluster/ModuleCluster/Define/_private_/ClusterStack.rb +28 -0
  10. data/lib/module-cluster/ModuleCluster/Define/_private_/ModuleCluster.rb +110 -0
  11. data/lib/module-cluster/ModuleCluster/Define/_private_/ModuleClusterCascades.rb +118 -0
  12. data/lib/module-cluster/ModuleCluster/Define/_private_/ModuleClusterCascadesToClass.rb +126 -0
  13. data/spec/ModuleCluster/Define/ModuleClusterCascadesToClass_spec.rb +421 -0
  14. data/spec/ModuleCluster/Define/ModuleClusterCascades_spec.rb +345 -0
  15. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +275 -0
  16. data/spec/ModuleCluster/Define/_private_/ClusterStack_spec.rb +24 -0
  17. data/spec/ModuleCluster/Define/_private_/ModuleClusterCascadesToClass_spec.rb +249 -0
  18. data/spec/ModuleCluster/Define/_private_/ModuleClusterCascades_spec.rb +223 -0
  19. data/spec/ModuleCluster/Define/_private_/ModuleCluster_spec.rb +168 -0
  20. data/spec/ModuleCluster_spec.rb +7 -2549
  21. metadata +21 -12
  22. data/lib/module-cluster/ModuleCluster/ExtendSupport.rb +0 -95
  23. data/lib/module-cluster/ModuleCluster/IncludeExtendSupport.rb +0 -104
  24. data/lib/module-cluster/ModuleCluster/IncludeSupport.rb +0 -94
  25. data/lib/module-cluster/ModuleCluster/_private_/IncludeExtendSupport.rb +0 -56
  26. data/lib/module-cluster/_private_/ModuleCluster.rb +0 -23
  27. data/spec/ModuleCluster/IncludeExtendSupport_spec.rb +0 -46
@@ -0,0 +1,223 @@
1
+
2
+ require_relative '../../../../lib/module-cluster.rb'
3
+
4
+ describe ModuleCluster::Define::ModuleClusterCascades do
5
+
6
+ ##############################################
7
+ # anonymous_module_cascade_append_features #
8
+ ##############################################
9
+
10
+ it 'it can construct an anonymous module each time requested to append features with modules' do
11
+ class ModuleCluster::Define::ModuleClusterCascades::PrivateMock01
12
+ extend ModuleCluster::Define::ModuleClusterCascades
13
+ module Module1
14
+ end
15
+ module Module2
16
+ end
17
+ anonymous_module_cascade_append_features_instance = anonymous_module_cascade_append_features( :include, Module1, Module2 )
18
+ anonymous_module_cascade_append_features_instance.is_a?( Module ).should == true
19
+ anonymous_module_cascade_append_features_instance.instance_methods.include?( :append_features ).should == true
20
+ module SomeModule
21
+ end
22
+ SomeModule.extend( anonymous_module_cascade_append_features_instance )
23
+ SomeModule.respond_to?( :append_features ).should == true
24
+ module SomeOtherModule
25
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeModule
26
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ).should == true
27
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ).should == true
28
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) ).should == true
29
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeModule ) ).should == true
30
+ end
31
+ module Cascade1
32
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeOtherModule
33
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ).should == true
34
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ).should == true
35
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) ).should == true
36
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeModule ) ).should == true
37
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeModule ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::SomeOtherModule ) ).should == true
38
+ end
39
+ anonymous_module_cascade_append_features_instance2 = anonymous_module_cascade_append_features( :extend, Module1, Module2 )
40
+ anonymous_module_cascade_append_features_instance2.should_not == anonymous_module_cascade_append_features_instance
41
+ module AnotherModule
42
+ end
43
+ AnotherModule.extend( anonymous_module_cascade_append_features_instance2 )
44
+ AnotherModule.respond_to?( :append_features ).should == true
45
+ module YetAnotherModule
46
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::AnotherModule
47
+ eigenclass = class << self ; self ; end
48
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ).should == true
49
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ).should == true
50
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) ).should == true
51
+ end
52
+ module Cascade2
53
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::YetAnotherModule
54
+ eigenclass = class << self ; self ; end
55
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ).should == true
56
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ).should == true
57
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock01::Module2 ) ).should == true
58
+ end
59
+ end
60
+ end
61
+
62
+ #######################################
63
+ # anonymous_module_cascade_included #
64
+ #######################################
65
+
66
+ it 'it can construct an anonymous module each time requested to include with modules' do
67
+ class ModuleCluster::Define::ModuleClusterCascades::PrivateMock02
68
+ extend ModuleCluster::Define::ModuleClusterCascades
69
+ module Module1
70
+ end
71
+ module Module2
72
+ end
73
+ anonymous_module_cascade_included_instance = anonymous_module_cascade_included( :include, Module1, Module2 )
74
+ anonymous_module_cascade_included_instance.is_a?( Module ).should == true
75
+ anonymous_module_cascade_included_instance.instance_methods.include?( :included ).should == true
76
+ module SomeModule
77
+ end
78
+ SomeModule.extend( anonymous_module_cascade_included_instance )
79
+ SomeModule.respond_to?( :included ).should == true
80
+ module SomeOtherModule
81
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::SomeModule
82
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ).should == true
83
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ).should == true
84
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) ).should == true
85
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::SomeModule ) ).should == false
86
+ end
87
+ module Cascade1
88
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::SomeOtherModule
89
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ).should == true
90
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ).should == true
91
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) ).should == true
92
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::SomeModule ) ).should == false
93
+ end
94
+ anonymous_module_cascade_included_instance2 = anonymous_module_cascade_included( :extend, Module1, Module2 )
95
+ anonymous_module_cascade_included_instance2.should_not == anonymous_module_cascade_included_instance
96
+ module AnotherModule
97
+ end
98
+ AnotherModule.extend( anonymous_module_cascade_included_instance2 )
99
+ AnotherModule.respond_to?( :included ).should == true
100
+ module YetAnotherModule
101
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::AnotherModule
102
+ eigenclass = class << self ; self ; end
103
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ).should == true
104
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ).should == true
105
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) ).should == true
106
+ end
107
+ module Cascade2
108
+ include ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::YetAnotherModule
109
+ eigenclass = class << self ; self ; end
110
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ).should == true
111
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ).should == true
112
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock02::Module2 ) ).should == true
113
+ end
114
+ end
115
+ end
116
+
117
+ ############################################
118
+ # anonymous_module_cascade_extend_object #
119
+ ############################################
120
+
121
+ it 'it can construct an anonymous module each time requested to extend object with modules' do
122
+ class ModuleCluster::Define::ModuleClusterCascades::PrivateMock03
123
+ extend ModuleCluster::Define::ModuleClusterCascades
124
+ module Module1
125
+ end
126
+ module Module2
127
+ end
128
+ anonymous_module_cascade_extend_object_instance = anonymous_module_cascade_extend_object( :include, Module1, Module2 )
129
+ anonymous_module_cascade_extend_object_instance.is_a?( Module ).should == true
130
+ anonymous_module_cascade_extend_object_instance.instance_methods.include?( :extend_object ).should == true
131
+ module SomeModule
132
+ end
133
+ SomeModule.extend( anonymous_module_cascade_extend_object_instance )
134
+ SomeModule.respond_to?( :extend_object ).should == true
135
+ module SomeOtherModule
136
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::SomeModule
137
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ).should == true
138
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ).should == true
139
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ) ).should == true
140
+ end
141
+ module Cascade1
142
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::SomeOtherModule
143
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ).should == true
144
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ).should == true
145
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ) ).should == true
146
+ end
147
+ anonymous_module_cascade_extend_object_instance2 = anonymous_module_cascade_extend_object( :extend, Module1, Module2 )
148
+ anonymous_module_cascade_extend_object_instance2.should_not == anonymous_module_cascade_extend_object_instance
149
+ module AnotherModule
150
+ end
151
+ AnotherModule.extend( anonymous_module_cascade_extend_object_instance2 )
152
+ AnotherModule.respond_to?( :extend_object ).should == true
153
+ module YetAnotherModule
154
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::AnotherModule
155
+ eigenclass = class << self ; self ; end
156
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ).should == true
157
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ).should == true
158
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ) ).should == true
159
+ end
160
+ module Cascade2
161
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::YetAnotherModule
162
+ eigenclass = class << self ; self ; end
163
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ).should == true
164
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ).should == true
165
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock03::Module2 ) ).should == true
166
+ end
167
+ end
168
+ end
169
+
170
+ #######################################
171
+ # anonymous_module_cascade_extended #
172
+ #######################################
173
+
174
+ it 'it can construct an anonymous module each time requested to extend with modules' do
175
+ class ModuleCluster::Define::ModuleClusterCascades::PrivateMock04
176
+ extend ModuleCluster::Define::ModuleClusterCascades
177
+ module Module1
178
+ end
179
+ module Module2
180
+ end
181
+ anonymous_module_cascade_extended_instance = anonymous_module_cascade_extended( :include, Module1, Module2 )
182
+ anonymous_module_cascade_extended_instance.is_a?( Module ).should == true
183
+ anonymous_module_cascade_extended_instance.instance_methods.include?( :extended ).should == true
184
+ module SomeModule
185
+ end
186
+ SomeModule.extend( anonymous_module_cascade_extended_instance )
187
+ SomeModule.respond_to?( :extended ).should == true
188
+ module SomeOtherModule
189
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::SomeModule
190
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ).should == true
191
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ).should == true
192
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ) ).should == true
193
+ end
194
+ module Cascade1
195
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::SomeOtherModule
196
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ).should == true
197
+ ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ).should == true
198
+ ( ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ) ).should == true
199
+ end
200
+ anonymous_module_cascade_extended_instance2 = anonymous_module_cascade_extended( :extend, Module1, Module2 )
201
+ anonymous_module_cascade_extended_instance2.should_not == anonymous_module_cascade_extended_instance
202
+ module AnotherModule
203
+ end
204
+ AnotherModule.extend( anonymous_module_cascade_extended_instance2 )
205
+ AnotherModule.respond_to?( :extended ).should == true
206
+ module YetAnotherModule
207
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::AnotherModule
208
+ eigenclass = class << self ; self ; end
209
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ).should == true
210
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ).should == true
211
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ) ).should == true
212
+ end
213
+ module Cascade2
214
+ extend ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::YetAnotherModule
215
+ eigenclass = class << self ; self ; end
216
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ).should == true
217
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ).should == true
218
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleClusterCascades::PrivateMock04::Module2 ) ).should == true
219
+ end
220
+ end
221
+ end
222
+
223
+ end
@@ -0,0 +1,168 @@
1
+
2
+ require_relative '../../../../lib/module-cluster.rb'
3
+
4
+ describe ModuleCluster::Define::ModuleCluster do
5
+
6
+ ######################################
7
+ # anonymous_module_append_features #
8
+ ######################################
9
+
10
+ it 'it can construct an anonymous module each time requested to append features with modules' do
11
+ class ModuleCluster::Define::ModuleCluster::PrivateMock01
12
+ extend ModuleCluster::Define::ModuleCluster
13
+ module Module1
14
+ end
15
+ module Module2
16
+ end
17
+ anonymous_module_append_features_instance = anonymous_module_append_features( :include, Module1, Module2 )
18
+ anonymous_module_append_features_instance.is_a?( Module ).should == true
19
+ anonymous_module_append_features_instance.instance_methods.include?( :append_features ).should == true
20
+ module SomeModule
21
+ end
22
+ SomeModule.extend( anonymous_module_append_features_instance )
23
+ SomeModule.respond_to?( :append_features ).should == true
24
+ module SomeOtherModule
25
+ include ModuleCluster::Define::ModuleCluster::PrivateMock01::SomeModule
26
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module1 ).should == true
27
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module2 ).should == true
28
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module2 ) ).should == true
29
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::SomeModule ) ).should == true
30
+ end
31
+ anonymous_module_append_features_instance2 = anonymous_module_append_features( :extend, Module1, Module2 )
32
+ anonymous_module_append_features_instance2.should_not == anonymous_module_append_features_instance
33
+ module AnotherModule
34
+ end
35
+ AnotherModule.extend( anonymous_module_append_features_instance2 )
36
+ AnotherModule.respond_to?( :append_features ).should == true
37
+ module YetAnotherModule
38
+ include ModuleCluster::Define::ModuleCluster::PrivateMock01::AnotherModule
39
+ eigenclass = class << self ; self ; end
40
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module1 ).should == true
41
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module2 ).should == true
42
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock01::Module2 ) ).should == true
43
+ end
44
+ end
45
+ end
46
+
47
+ ###############################
48
+ # anonymous_module_included #
49
+ ###############################
50
+
51
+ it 'it can construct an anonymous module each time requested to include with modules' do
52
+ class ModuleCluster::Define::ModuleCluster::PrivateMock02
53
+ extend ModuleCluster::Define::ModuleCluster
54
+ module Module1
55
+ end
56
+ module Module2
57
+ end
58
+ anonymous_module_included_instance = anonymous_module_included( :include, Module1, Module2 )
59
+ anonymous_module_included_instance.is_a?( Module ).should == true
60
+ anonymous_module_included_instance.instance_methods.include?( :included ).should == true
61
+ module SomeModule
62
+ end
63
+ SomeModule.extend( anonymous_module_included_instance )
64
+ SomeModule.respond_to?( :included ).should == true
65
+ module SomeOtherModule
66
+ include ModuleCluster::Define::ModuleCluster::PrivateMock02::SomeModule
67
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module1 ).should == true
68
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module2 ).should == true
69
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module2 ) ).should == true
70
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module2 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::SomeModule ) ).should == false
71
+ end
72
+ anonymous_module_included_instance2 = anonymous_module_included( :extend, Module1, Module2 )
73
+ anonymous_module_included_instance2.should_not == anonymous_module_included_instance
74
+ module AnotherModule
75
+ end
76
+ AnotherModule.extend( anonymous_module_included_instance2 )
77
+ AnotherModule.respond_to?( :included ).should == true
78
+ module YetAnotherModule
79
+ include ModuleCluster::Define::ModuleCluster::PrivateMock02::AnotherModule
80
+ eigenclass = class << self ; self ; end
81
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module1 ).should == true
82
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module2 ).should == true
83
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock02::Module2 ) ).should == true
84
+ end
85
+ end
86
+ end
87
+
88
+ ####################################
89
+ # anonymous_module_extend_object #
90
+ ####################################
91
+
92
+ it 'it can construct an anonymous module each time requested to extend object with modules' do
93
+ class ModuleCluster::Define::ModuleCluster::PrivateMock03
94
+ extend ModuleCluster::Define::ModuleCluster
95
+ module Module1
96
+ end
97
+ module Module2
98
+ end
99
+ anonymous_module_extend_object_instance = anonymous_module_extend_object( :include, Module1, Module2 )
100
+ anonymous_module_extend_object_instance.is_a?( Module ).should == true
101
+ anonymous_module_extend_object_instance.instance_methods.include?( :extend_object ).should == true
102
+ module SomeModule
103
+ end
104
+ SomeModule.extend( anonymous_module_extend_object_instance )
105
+ SomeModule.respond_to?( :extend_object ).should == true
106
+ module SomeOtherModule
107
+ extend ModuleCluster::Define::ModuleCluster::PrivateMock03::SomeModule
108
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module1 ).should == true
109
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module2 ).should == true
110
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module2 ) ).should == true
111
+ end
112
+ anonymous_module_extend_object_instance2 = anonymous_module_extend_object( :extend, Module1, Module2 )
113
+ anonymous_module_extend_object_instance2.should_not == anonymous_module_extend_object_instance
114
+ module AnotherModule
115
+ end
116
+ AnotherModule.extend( anonymous_module_extend_object_instance2 )
117
+ AnotherModule.respond_to?( :extend_object ).should == true
118
+ module YetAnotherModule
119
+ extend ModuleCluster::Define::ModuleCluster::PrivateMock03::AnotherModule
120
+ eigenclass = class << self ; self ; end
121
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module1 ).should == true
122
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module2 ).should == true
123
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock03::Module2 ) ).should == true
124
+ end
125
+ end
126
+ end
127
+
128
+ ###############################
129
+ # anonymous_module_extended #
130
+ ###############################
131
+
132
+ it 'it can construct an anonymous module each time requested to extend with modules' do
133
+ class ModuleCluster::Define::ModuleCluster::PrivateMock04
134
+ extend ModuleCluster::Define::ModuleCluster
135
+ module Module1
136
+ end
137
+ module Module2
138
+ end
139
+ anonymous_module_extended_instance = anonymous_module_extended( :include, Module1, Module2 )
140
+ anonymous_module_extended_instance.is_a?( Module ).should == true
141
+ anonymous_module_extended_instance.instance_methods.include?( :extended ).should == true
142
+ module SomeModule
143
+ end
144
+ SomeModule.extend( anonymous_module_extended_instance )
145
+ SomeModule.respond_to?( :extended ).should == true
146
+ module SomeOtherModule
147
+ extend ModuleCluster::Define::ModuleCluster::PrivateMock04::SomeModule
148
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module1 ).should == true
149
+ ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module2 ).should == true
150
+ ( ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module1 ) > ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module2 ) ).should == true
151
+ end
152
+ anonymous_module_extended_instance2 = anonymous_module_extended( :extend, Module1, Module2 )
153
+ anonymous_module_extended_instance2.should_not == anonymous_module_extended_instance
154
+ module AnotherModule
155
+ end
156
+ AnotherModule.extend( anonymous_module_extended_instance2 )
157
+ AnotherModule.respond_to?( :extended ).should == true
158
+ module YetAnotherModule
159
+ extend ModuleCluster::Define::ModuleCluster::PrivateMock04::AnotherModule
160
+ eigenclass = class << self ; self ; end
161
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module1 ).should == true
162
+ eigenclass.ancestors.include?( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module2 ).should == true
163
+ ( eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module1 ) > eigenclass.ancestors.index( ModuleCluster::Define::ModuleCluster::PrivateMock04::Module2 ) ).should == true
164
+ end
165
+ end
166
+ end
167
+
168
+ end
@@ -2,2555 +2,13 @@ require_relative '../lib/module-cluster.rb'
2
2
 
3
3
  describe ModuleCluster do
4
4
 
5
- ############################
6
- # define_module_included #
7
- ############################
8
-
9
- it 'can define includes and extends for module inclusion' do
10
- module ModuleCluster::MockInclusion01
11
- extend ModuleCluster
12
- module Mock1
13
- end
14
- module Mock2
15
- end
16
- module Mock3
17
- end
18
- define_module_included do |includes, extends|
19
- includes.concat [ Mock1, Mock2 ]
20
- extends.concat [ Mock3 ]
21
- end
22
- end
23
- module ModuleCluster::MockInclusion01a
24
- eigenclass = class << self ; self ; end
25
- ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
26
- ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
27
- ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
28
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
29
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
30
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
31
- include ModuleCluster::MockInclusion01
32
- ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == true
33
- ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == true
34
- ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
35
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
36
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
37
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == true
38
- end
39
- module ModuleCluster::MockInclusion02
40
- extend ModuleCluster
41
- module Mock1
42
- end
43
- module Mock2
44
- end
45
- module Mock3
46
- end
47
- define_module_included do |includes, extends|
48
- includes.concat [ Mock1, Mock2 ]
49
- end
50
- end
51
- module ModuleCluster::MockInclusion02a
52
- eigenclass = class << self ; self ; end
53
- ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == false
54
- ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
55
- ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
56
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == false
57
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
58
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
59
- include ModuleCluster::MockInclusion02
60
- ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == true
61
- ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == true
62
- ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
63
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
64
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
65
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
66
- end
67
- module ModuleCluster::MockInclusion03
68
- extend ModuleCluster
69
- module Mock1
70
- end
71
- module Mock2
72
- end
73
- module Mock3
74
- end
75
- define_module_included do |includes, extends|
76
- extends.concat [ Mock3 ]
77
- end
78
- end
79
- module ModuleCluster::MockInclusion03a
80
- eigenclass = class << self ; self ; end
81
- ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
82
- ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
83
- ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
84
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
85
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
86
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
87
- include ModuleCluster::MockInclusion03
88
- ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
89
- ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
90
- ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
91
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
92
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
93
- eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == true
94
- end
95
- end
96
-
97
- ############################
98
- # define_module_extended #
99
- ############################
100
-
101
- it 'can define includes and extends for module extension' do
102
- module ModuleCluster::MockExtension01
103
- extend ModuleCluster
104
- module Mock1
105
- end
106
- module Mock2
107
- end
108
- module Mock3
109
- end
110
- define_module_extended do |includes, extends|
111
- includes.concat [ Mock1, Mock2 ]
112
- extends.concat [ Mock3 ]
113
- end
114
- end
115
- module ModuleCluster::MockExtension01a
116
- eigenclass = class << self ; self ; end
117
- ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
118
- ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
119
- ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
120
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
121
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
122
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
123
- extend ModuleCluster::MockExtension01
124
- ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == true
125
- ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == true
126
- ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
127
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
128
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
129
- eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == true
130
- end
131
- module ModuleCluster::MockExtension02
132
- extend ModuleCluster
133
- module Mock1
134
- end
135
- module Mock2
136
- end
137
- module Mock3
138
- end
139
- define_module_extended do |includes, extends|
140
- includes.concat [ Mock1, Mock2 ]
141
- end
142
- end
143
- module ModuleCluster::MockExtension02a
144
- eigenclass = class << self ; self ; end
145
- ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
146
- ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
147
- ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
148
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
149
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
150
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
151
- extend ModuleCluster::MockExtension02
152
- ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == true
153
- ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == true
154
- ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
155
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
156
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
157
- eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
158
- end
159
- module ModuleCluster::MockExtension03
160
- extend ModuleCluster
161
- module Mock1
162
- end
163
- module Mock2
164
- end
165
- module Mock3
166
- end
167
- define_module_extended do |includes, extends|
168
- extends.concat [ Mock3 ]
169
- end
170
- end
171
- module ModuleCluster::MockExtension03a
172
- eigenclass = class << self ; self ; end
173
- ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
174
- ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
175
- ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
176
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
177
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
178
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
179
- extend ModuleCluster::MockExtension03
180
- ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
181
- ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
182
- ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
183
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
184
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
185
- eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == true
186
- end
187
- end
188
-
189
- ###########################
190
- # define_module_cluster #
191
- ###########################
192
-
193
- it 'can define includes and extends for module extension and inclusion' do
194
- module ModuleCluster::MockClusterInclusion01
195
- extend ModuleCluster
196
- module Mock1
197
- end
198
- module Mock2
199
- end
200
- module Mock3
201
- end
202
- define_module_cluster do |includes, extends|
203
- includes.concat [ Mock1, Mock2 ]
204
- extends.concat [ Mock3 ]
205
- end
206
- end
207
- module ModuleCluster::MockClusterInclusion01a
208
- eigenclass = class << self ; self ; end
209
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
210
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
211
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
212
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
213
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
214
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
215
- include ModuleCluster::MockClusterInclusion01
216
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == true
217
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == true
218
- ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
219
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
220
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
221
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == true
222
- end
223
- module ModuleCluster::MockClusterInclusion02
224
- extend ModuleCluster
225
- module Mock1
226
- end
227
- module Mock2
228
- end
229
- module Mock3
230
- end
231
- define_module_cluster do |includes, extends|
232
- includes.concat [ Mock1, Mock2 ]
233
- end
234
- end
235
- module ModuleCluster::MockClusterInclusion02a
236
- eigenclass = class << self ; self ; end
237
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == false
238
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == false
239
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
240
- include ModuleCluster::MockClusterInclusion02
241
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == true
242
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == true
243
- ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
244
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == false
245
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == false
246
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
247
- end
248
- module ModuleCluster::MockClusterInclusion03
249
- extend ModuleCluster
250
- module Mock1
251
- end
252
- module Mock2
253
- end
254
- module Mock3
255
- end
256
- define_module_cluster do |includes, extends|
257
- extends.concat [ Mock3 ]
258
- end
259
- end
260
- module ModuleCluster::MockClusterInclusion03a
261
- eigenclass = class << self ; self ; end
262
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
263
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
264
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == false
265
- include ModuleCluster::MockClusterInclusion03
266
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
267
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
268
- ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == false
269
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
270
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
271
- eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == true
272
- end
273
- module ModuleCluster::MockClusterExtension01
274
- extend ModuleCluster
275
- module Mock1
276
- end
277
- module Mock2
278
- end
279
- module Mock3
280
- end
281
- define_module_cluster do |includes, extends|
282
- includes.concat [ Mock1, Mock2 ]
283
- extends.concat [ Mock3 ]
284
- end
285
- end
286
- module ModuleCluster::MockClusterExtension01a
287
- eigenclass = class << self ; self ; end
288
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
289
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
290
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
291
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
292
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
293
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
294
- extend ModuleCluster::MockClusterExtension01
295
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == true
296
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == true
297
- ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
298
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
299
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
300
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == true
301
- end
302
- module ModuleCluster::MockClusterExtension02
303
- extend ModuleCluster
304
- module Mock1
305
- end
306
- module Mock2
307
- end
308
- module Mock3
309
- end
310
- define_module_cluster do |includes, extends|
311
- includes.concat [ Mock1, Mock2 ]
312
- end
313
- end
314
- module ModuleCluster::MockClusterExtension02a
315
- eigenclass = class << self ; self ; end
316
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
317
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
318
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
319
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
320
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
321
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
322
- extend ModuleCluster::MockClusterExtension02
323
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == true
324
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == true
325
- ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
326
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
327
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
328
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
329
- end
330
- module ModuleCluster::MockClusterExtension03
331
- extend ModuleCluster
332
- module Mock1
333
- end
334
- module Mock2
335
- end
336
- module Mock3
337
- end
338
- define_module_cluster do |includes, extends|
339
- extends.concat [ Mock3 ]
340
- end
341
- end
342
- module ModuleCluster::MockClusterExtension03a
343
- eigenclass = class << self ; self ; end
344
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
345
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
346
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
347
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
348
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
349
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
350
- extend ModuleCluster::MockClusterExtension03
351
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
352
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
353
- ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
354
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
355
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
356
- eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == true
357
- end
358
- end
359
-
360
- #####################################
361
- # define_module_included_cascades #
362
- #####################################
363
-
364
- it 'can define includes and extends for module inclusion' do
365
- module ModuleCluster::MockInclusionCascades01
366
- extend ModuleCluster
367
- module Mock1
368
- end
369
- module Mock2
370
- end
371
- module Mock3
372
- end
373
- define_module_included_cascades do |includes, extends|
374
- includes.concat [ Mock1, Mock2 ]
375
- extends.concat [ Mock3 ]
376
- end
377
- end
378
- module ModuleCluster::MockInclusionCascades01a
379
- eigenclass = class << self ; self ; end
380
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
381
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
382
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
383
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
384
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
385
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
386
- include ModuleCluster::MockInclusionCascades01
387
- methods.include?( :included ).should == true
388
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
389
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
390
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
391
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
392
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
393
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == true
394
- end
395
- class ModuleCluster::MockInclusionCascades01ClassIncludes
396
- eigenclass = class << self ; self ; end
397
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
398
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
399
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
400
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
401
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
402
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
403
- include ModuleCluster::MockInclusionCascades01a
404
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
405
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
406
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
407
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
408
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
409
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == true
410
- end
411
- class ModuleCluster::MockInclusionCascades01ClassExtends
412
- eigenclass = class << self ; self ; end
413
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
414
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
415
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
416
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
417
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
418
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
419
- extend ModuleCluster::MockInclusionCascades01a
420
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
421
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
422
- ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
423
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
424
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
425
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
426
- end
427
- module ModuleCluster::MockInclusionCascades02
428
- extend ModuleCluster
429
- module Mock1
430
- end
431
- module Mock2
432
- end
433
- module Mock3
434
- end
435
- define_module_included_cascades do |includes, extends|
436
- includes.concat [ Mock1, Mock2 ]
437
- end
438
- end
439
- class ModuleCluster::MockInclusionCascades02ClassIncludes
440
- eigenclass = class << self ; self ; end
441
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
442
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
443
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
444
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
445
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
446
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
447
- include ModuleCluster::MockInclusionCascades02
448
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
449
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
450
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
451
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
452
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
453
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
454
- end
455
- class ModuleCluster::MockInclusionCascades02ClassExtends
456
- eigenclass = class << self ; self ; end
457
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
458
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
459
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
460
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
461
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
462
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
463
- extend ModuleCluster::MockInclusionCascades02
464
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
465
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
466
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
467
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
468
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
469
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
470
- end
471
- module ModuleCluster::MockInclusionCascades02a
472
- eigenclass = class << self ; self ; end
473
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
474
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
475
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
476
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
477
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
478
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
479
- include ModuleCluster::MockInclusionCascades02
480
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
481
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
482
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
483
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
484
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
485
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
486
- end
487
- class ModuleCluster::MockInclusionCascades02aClassIncludes
488
- eigenclass = class << self ; self ; end
489
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
490
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
491
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
492
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
493
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
494
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
495
- include ModuleCluster::MockInclusionCascades02a
496
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
497
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
498
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
499
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
500
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
501
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
502
- end
503
- class ModuleCluster::MockInclusionCascades02aClassExtends
504
- eigenclass = class << self ; self ; end
505
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
506
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
507
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
508
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
509
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
510
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
511
- extend ModuleCluster::MockInclusionCascades02a
512
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
513
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
514
- ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
515
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
516
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
517
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
518
- end
519
- module ModuleCluster::MockInclusionCascades03
520
- extend ModuleCluster
521
- module Mock1
522
- end
523
- module Mock2
524
- end
525
- module Mock3
526
- end
527
- define_module_included_cascades do |includes, extends|
528
- extends.concat [ Mock3 ]
529
- end
530
- end
531
- class ModuleCluster::MockInclusionCascades03ClassIncludes
532
- eigenclass = class << self ; self ; end
533
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
534
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
535
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
536
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
537
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
538
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
539
- include ModuleCluster::MockInclusionCascades03
540
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
541
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
542
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
543
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
544
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
545
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
546
- end
547
- class ModuleCluster::MockInclusionCascades03ClassExtends
548
- eigenclass = class << self ; self ; end
549
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
550
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
551
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
552
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
553
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
554
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
555
- extend ModuleCluster::MockInclusionCascades03
556
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
557
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
558
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
559
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
560
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
561
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
562
- end
563
- module ModuleCluster::MockInclusionCascades03a
564
- eigenclass = class << self ; self ; end
565
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
566
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
567
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
568
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
569
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
570
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
571
- include ModuleCluster::MockInclusionCascades03
572
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
573
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
574
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
575
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
576
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
577
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
578
- end
579
- class ModuleCluster::MockInclusionCascades03aClassIncludes
580
- eigenclass = class << self ; self ; end
581
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
582
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
583
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
584
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
585
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
586
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
587
- include ModuleCluster::MockInclusionCascades03a
588
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
589
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
590
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
591
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
592
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
593
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
594
- end
595
- class ModuleCluster::MockInclusionCascades03aClassExtends
596
- eigenclass = class << self ; self ; end
597
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
598
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
599
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
600
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
601
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
602
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
603
- extend ModuleCluster::MockInclusionCascades03a
604
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
605
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
606
- ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
607
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
608
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
609
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
5
+ it 'clusters other modules' do
6
+ module ModuleCluster
7
+ is_a?( ModuleCluster::Define::ModuleCluster )
8
+ is_a?( ModuleCluster::Define::ModuleClusterCascades )
9
+ is_a?( ModuleCluster::Define::ModuleClusterCascadesToClass )
10
+ is_a?( ModuleCluster::Define::Deprecated )
610
11
  end
611
12
  end
612
-
613
- #####################################
614
- # define_module_extended_cascades #
615
- #####################################
616
-
617
- it 'can define includes and extends for module extension' do
618
- module ModuleCluster::MockExtensionCascades01
619
- extend ModuleCluster
620
- module Mock1
621
- end
622
- module Mock2
623
- end
624
- module Mock3
625
- end
626
- define_module_extended_cascades do |includes, extends|
627
- includes.concat [ Mock1, Mock2 ]
628
- extends.concat [ Mock3 ]
629
- end
630
- end
631
- class ModuleCluster::MockExtensionCascades01ClassIncludes
632
- eigenclass = class << self ; self ; end
633
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
634
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
635
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
636
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
637
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
638
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
639
- include ModuleCluster::MockExtensionCascades01
640
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
641
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
642
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
643
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
644
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
645
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
646
- end
647
- class ModuleCluster::MockExtensionCascades01ClassExtends
648
- eigenclass = class << self ; self ; end
649
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
650
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
651
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
652
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
653
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
654
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
655
- extend ModuleCluster::MockExtensionCascades01
656
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
657
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
658
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
659
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
660
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
661
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
662
- end
663
- module ModuleCluster::MockExtensionCascades01a
664
- eigenclass = class << self ; self ; end
665
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
666
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
667
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
668
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
669
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
670
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
671
- extend ModuleCluster::MockExtensionCascades01
672
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
673
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
674
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
675
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
676
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
677
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
678
- end
679
- class ModuleCluster::MockExtensionCascades01aClassIncludes
680
- eigenclass = class << self ; self ; end
681
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
682
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
683
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
684
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
685
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
686
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
687
- include ModuleCluster::MockExtensionCascades01a
688
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
689
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
690
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
691
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
692
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
693
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
694
- end
695
- class ModuleCluster::MockExtensionCascades01aClassExtends
696
- eigenclass = class << self ; self ; end
697
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
698
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
699
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
700
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
701
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
702
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
703
- extend ModuleCluster::MockExtensionCascades01a
704
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
705
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
706
- ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
707
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
708
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
709
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
710
- end
711
- module ModuleCluster::MockExtensionCascades02
712
- extend ModuleCluster
713
- module Mock1
714
- end
715
- module Mock2
716
- end
717
- module Mock3
718
- end
719
- define_module_extended_cascades do |includes, extends|
720
- includes.concat [ Mock1, Mock2 ]
721
- end
722
- end
723
- class ModuleCluster::MockExtensionCascades02ClassIncludes
724
- eigenclass = class << self ; self ; end
725
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
726
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
727
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
728
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
729
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
730
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
731
- include ModuleCluster::MockExtensionCascades02
732
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
733
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
734
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
735
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
736
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
737
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
738
- end
739
- class ModuleCluster::MockExtensionCascades02ClassExtends
740
- eigenclass = class << self ; self ; end
741
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
742
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
743
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
744
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
745
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
746
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
747
- extend ModuleCluster::MockExtensionCascades02
748
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
749
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
750
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
751
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
752
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
753
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
754
- end
755
- module ModuleCluster::MockExtensionCascades02a
756
- eigenclass = class << self ; self ; end
757
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
758
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
759
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
760
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
761
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
762
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
763
- extend ModuleCluster::MockExtensionCascades02
764
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
765
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
766
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
767
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
768
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
769
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
770
- end
771
- class ModuleCluster::MockExtensionCascades02aClassIncludes
772
- eigenclass = class << self ; self ; end
773
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
774
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
775
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
776
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
777
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
778
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
779
- include ModuleCluster::MockExtensionCascades02a
780
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
781
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
782
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
783
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
784
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
785
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
786
- end
787
- class ModuleCluster::MockExtensionCascades02aClassExtends
788
- eigenclass = class << self ; self ; end
789
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
790
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
791
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
792
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
793
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
794
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
795
- extend ModuleCluster::MockExtensionCascades02a
796
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
797
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
798
- ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
799
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
800
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
801
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
802
- end
803
- module ModuleCluster::MockExtensionCascades03
804
- extend ModuleCluster
805
- module Mock1
806
- end
807
- module Mock2
808
- end
809
- module Mock3
810
- end
811
- define_module_extended_cascades do |includes, extends|
812
- extends.concat [ Mock3 ]
813
- end
814
- end
815
- class ModuleCluster::MockExtensionCascades03ClassIncludes
816
- eigenclass = class << self ; self ; end
817
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
818
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
819
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
820
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
821
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
822
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
823
- include ModuleCluster::MockExtensionCascades03
824
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
825
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
826
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
827
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
828
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
829
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
830
- end
831
- class ModuleCluster::MockExtensionCascades03ClassExtends
832
- eigenclass = class << self ; self ; end
833
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
834
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
835
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
836
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
837
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
838
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
839
- extend ModuleCluster::MockExtensionCascades03
840
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
841
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
842
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
843
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
844
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
845
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
846
- end
847
- module ModuleCluster::MockExtensionCascades03a
848
- eigenclass = class << self ; self ; end
849
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
850
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
851
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
852
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
853
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
854
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
855
- extend ModuleCluster::MockExtensionCascades03
856
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
857
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
858
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
859
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
860
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
861
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
862
- end
863
- class ModuleCluster::MockExtensionCascades03aClassIncludes
864
- eigenclass = class << self ; self ; end
865
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
866
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
867
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
868
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
869
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
870
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
871
- include ModuleCluster::MockExtensionCascades03a
872
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
873
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
874
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
875
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
876
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
877
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
878
- end
879
- class ModuleCluster::MockExtensionCascades03aClassExtends
880
- eigenclass = class << self ; self ; end
881
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
882
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
883
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
884
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
885
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
886
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
887
- extend ModuleCluster::MockExtensionCascades03a
888
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
889
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
890
- ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
891
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
892
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
893
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
894
- end
895
- end
896
-
897
- ####################################
898
- # define_module_cluster_cascades #
899
- ####################################
900
-
901
- it 'can define includes and extends for module extension and inclusion' do
902
- module ModuleCluster::MockClusterCascadesInclusion01
903
- extend ModuleCluster
904
- module Mock1
905
- end
906
- module Mock2
907
- end
908
- module Mock3
909
- end
910
- define_module_cluster_cascades do |includes, extends|
911
- includes.concat [ Mock1, Mock2 ]
912
- extends.concat [ Mock3 ]
913
- end
914
- end
915
- class ModuleCluster::MockClusterCascadesInclusion01ClassIncludes
916
- eigenclass = class << self ; self ; end
917
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
918
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
919
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
920
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
921
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
922
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
923
- include ModuleCluster::MockClusterCascadesInclusion01
924
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
925
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
926
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
927
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
928
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
929
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
930
- end
931
- class ModuleCluster::MockClusterCascadesInclusion01ClassExtends
932
- eigenclass = class << self ; self ; end
933
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
934
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
935
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
936
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
937
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
938
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
939
- extend ModuleCluster::MockClusterCascadesInclusion01
940
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
941
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
942
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
943
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
944
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
945
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
946
- end
947
- module ModuleCluster::MockClusterCascadesInclusion01a
948
- eigenclass = class << self ; self ; end
949
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
950
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
951
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
952
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
953
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
954
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
955
- include ModuleCluster::MockClusterCascadesInclusion01
956
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
957
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
958
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
959
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
960
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
961
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
962
- end
963
- class ModuleCluster::MockClusterCascadesInclusion01aClassIncludes
964
- eigenclass = class << self ; self ; end
965
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
966
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
967
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
968
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
969
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
970
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
971
- include ModuleCluster::MockClusterCascadesInclusion01a
972
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
973
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
974
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
975
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
976
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
977
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
978
- end
979
- class ModuleCluster::MockClusterCascadesInclusion01aClassExtends
980
- eigenclass = class << self ; self ; end
981
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
982
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
983
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
984
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
985
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
986
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
987
- extend ModuleCluster::MockClusterCascadesInclusion01a
988
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
989
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
990
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
991
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
992
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
993
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
994
- end
995
- module ModuleCluster::MockClusterCascadesInclusion02
996
- extend ModuleCluster
997
- module Mock1
998
- end
999
- module Mock2
1000
- end
1001
- module Mock3
1002
- end
1003
- define_module_cluster_cascades do |includes, extends|
1004
- includes.concat [ Mock1, Mock2 ]
1005
- end
1006
- end
1007
- class ModuleCluster::MockClusterCascadesInclusion02Includes
1008
- eigenclass = class << self ; self ; end
1009
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1010
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1011
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1012
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1013
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1014
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1015
- include ModuleCluster::MockClusterCascadesInclusion02
1016
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1017
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1018
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1019
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1020
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1021
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1022
- end
1023
- class ModuleCluster::MockClusterCascadesInclusion02Extends
1024
- eigenclass = class << self ; self ; end
1025
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1026
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1027
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1028
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1029
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1030
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1031
- extend ModuleCluster::MockClusterCascadesInclusion02
1032
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1033
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1034
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1035
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1036
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1037
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1038
- end
1039
- module ModuleCluster::MockClusterCascadesInclusion02a
1040
- eigenclass = class << self ; self ; end
1041
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1042
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1043
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1044
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1045
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1046
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1047
- include ModuleCluster::MockClusterCascadesInclusion02
1048
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1049
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1050
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1051
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1052
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1053
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1054
- end
1055
- class ModuleCluster::MockClusterCascadesInclusion02aClassIncludes
1056
- eigenclass = class << self ; self ; end
1057
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1058
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1059
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1060
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1061
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1062
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1063
- include ModuleCluster::MockClusterCascadesInclusion02a
1064
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1065
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1066
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1067
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1068
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1069
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1070
- end
1071
- class ModuleCluster::MockClusterCascadesInclusion02aClassExtends
1072
- eigenclass = class << self ; self ; end
1073
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1074
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1075
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1076
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1077
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1078
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1079
- extend ModuleCluster::MockClusterCascadesInclusion02a
1080
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1081
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1082
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1083
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1084
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1085
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1086
- end
1087
- module ModuleCluster::MockClusterCascadesInclusion03
1088
- extend ModuleCluster
1089
- module Mock1
1090
- end
1091
- module Mock2
1092
- end
1093
- module Mock3
1094
- end
1095
- define_module_cluster_cascades do |includes, extends|
1096
- extends.concat [ Mock3 ]
1097
- end
1098
- end
1099
- class ModuleCluster::MockClusterCascadesInclusion03ClassIncludes
1100
- eigenclass = class << self ; self ; end
1101
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1102
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1103
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1104
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1105
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1106
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1107
- include ModuleCluster::MockClusterCascadesInclusion03
1108
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1109
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1110
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1111
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1112
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1113
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1114
- end
1115
- class ModuleCluster::MockClusterCascadesInclusion03ClassExtends
1116
- eigenclass = class << self ; self ; end
1117
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1118
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1119
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1120
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1121
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1122
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1123
- extend ModuleCluster::MockClusterCascadesInclusion03
1124
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1125
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1126
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1127
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1128
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1129
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1130
- end
1131
- module ModuleCluster::MockClusterCascadesInclusion03a
1132
- eigenclass = class << self ; self ; end
1133
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1134
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1135
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1136
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1137
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1138
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1139
- include ModuleCluster::MockClusterCascadesInclusion03
1140
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1141
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1142
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1143
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1144
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1145
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1146
- end
1147
- class ModuleCluster::MockClusterCascadesInclusion03aClassInclude
1148
- eigenclass = class << self ; self ; end
1149
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1150
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1151
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1152
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1153
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1154
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1155
- include ModuleCluster::MockClusterCascadesInclusion03a
1156
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1157
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1158
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1159
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1160
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1161
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1162
- end
1163
- class ModuleCluster::MockClusterCascadesInclusion03aClassExtends
1164
- eigenclass = class << self ; self ; end
1165
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1166
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1167
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1168
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1169
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1170
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1171
- extend ModuleCluster::MockClusterCascadesInclusion03a
1172
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1173
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1174
- ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1175
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1176
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1177
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1178
- end
1179
- module ModuleCluster::MockClusterCascadesExtension01
1180
- extend ModuleCluster
1181
- module Mock1
1182
- end
1183
- module Mock2
1184
- end
1185
- module Mock3
1186
- end
1187
- define_module_cluster_cascades do |includes, extends|
1188
- includes.concat [ Mock1, Mock2 ]
1189
- extends.concat [ Mock3 ]
1190
- end
1191
- end
1192
- class ModuleCluster::MockClusterCascadesExtension01ClassIncludes
1193
- eigenclass = class << self ; self ; end
1194
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1195
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1196
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1197
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1198
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1199
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1200
- include ModuleCluster::MockClusterCascadesExtension01
1201
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1202
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1203
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1204
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1205
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1206
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1207
- end
1208
- class ModuleCluster::MockClusterCascadesExtension01ClassExtends
1209
- eigenclass = class << self ; self ; end
1210
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1211
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1212
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1213
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1214
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1215
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1216
- extend ModuleCluster::MockClusterCascadesExtension01
1217
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1218
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1219
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1220
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1221
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1222
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1223
- end
1224
- module ModuleCluster::MockClusterCascadesExtension01a
1225
- eigenclass = class << self ; self ; end
1226
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1227
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1228
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1229
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1230
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1231
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1232
- extend ModuleCluster::MockClusterCascadesExtension01
1233
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1234
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1235
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1236
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1237
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1238
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1239
- end
1240
- class ModuleCluster::MockClusterCascadesExtension01aClassIncludes
1241
- eigenclass = class << self ; self ; end
1242
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1243
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1244
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1245
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1246
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1247
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1248
- include ModuleCluster::MockClusterCascadesExtension01a
1249
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1250
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1251
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1252
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1253
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1254
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1255
- end
1256
- class ModuleCluster::MockClusterCascadesExtension01aClassExtends
1257
- eigenclass = class << self ; self ; end
1258
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1259
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1260
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1261
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1262
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1263
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1264
- extend ModuleCluster::MockClusterCascadesExtension01a
1265
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1266
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1267
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1268
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1269
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1270
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1271
- end
1272
- module ModuleCluster::MockClusterCascadesExtension02
1273
- extend ModuleCluster
1274
- module Mock1
1275
- end
1276
- module Mock2
1277
- end
1278
- module Mock3
1279
- end
1280
- define_module_cluster_cascades do |includes, extends|
1281
- includes.concat [ Mock1, Mock2 ]
1282
- end
1283
- end
1284
- class ModuleCluster::MockClusterCascadesExtension02ClassIncludes
1285
- eigenclass = class << self ; self ; end
1286
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1287
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1288
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1289
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1290
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1291
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1292
- include ModuleCluster::MockClusterCascadesExtension02
1293
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1294
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1295
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1296
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1297
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1298
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1299
- end
1300
- class ModuleCluster::MockClusterCascadesExtension02ClassExtends
1301
- eigenclass = class << self ; self ; end
1302
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1303
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1304
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1305
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1306
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1307
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1308
- extend ModuleCluster::MockClusterCascadesExtension02
1309
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1310
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1311
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1312
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1313
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1314
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1315
- end
1316
- module ModuleCluster::MockClusterCascadesExtension02a
1317
- eigenclass = class << self ; self ; end
1318
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1319
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1320
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1321
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1322
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1323
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1324
- extend ModuleCluster::MockClusterCascadesExtension02
1325
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1326
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1327
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1328
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1329
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1330
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1331
- end
1332
- class ModuleCluster::MockClusterCascadesExtension02aClassIncludes
1333
- eigenclass = class << self ; self ; end
1334
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1335
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1336
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1337
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1338
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1339
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1340
- include ModuleCluster::MockClusterCascadesExtension02a
1341
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1342
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1343
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1344
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1345
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1346
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1347
- end
1348
- class ModuleCluster::MockClusterCascadesExtension02aClassExtends
1349
- eigenclass = class << self ; self ; end
1350
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1351
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1352
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1353
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1354
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1355
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1356
- extend ModuleCluster::MockClusterCascadesExtension02a
1357
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1358
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1359
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1360
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1361
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1362
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1363
- end
1364
- module ModuleCluster::MockClusterCascadesExtension03
1365
- extend ModuleCluster
1366
- module Mock1
1367
- end
1368
- module Mock2
1369
- end
1370
- module Mock3
1371
- end
1372
- define_module_cluster_cascades do |includes, extends|
1373
- extends.concat [ Mock3 ]
1374
- end
1375
- end
1376
- class ModuleCluster::MockClusterCascadesExtension03ClassIncludes
1377
- eigenclass = class << self ; self ; end
1378
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1379
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1380
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1381
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1382
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1383
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1384
- include ModuleCluster::MockClusterCascadesExtension03
1385
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1386
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1387
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1388
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1389
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1390
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1391
- end
1392
- class ModuleCluster::MockClusterCascadesExtension03ClassExtends
1393
- eigenclass = class << self ; self ; end
1394
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1395
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1396
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1397
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1398
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1399
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1400
- extend ModuleCluster::MockClusterCascadesExtension03
1401
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1402
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1403
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1404
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1405
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1406
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1407
- end
1408
- module ModuleCluster::MockClusterCascadesExtension03a
1409
- eigenclass = class << self ; self ; end
1410
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1411
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1412
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1413
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1414
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1415
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1416
- extend ModuleCluster::MockClusterCascadesExtension03
1417
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1418
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1419
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1420
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1421
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1422
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1423
- end
1424
- class ModuleCluster::MockClusterCascadesExtension03aClassIncludes
1425
- eigenclass = class << self ; self ; end
1426
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1427
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1428
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1429
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1430
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1431
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1432
- include ModuleCluster::MockClusterCascadesExtension03a
1433
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1434
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1435
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1436
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1437
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1438
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1439
- end
1440
- class ModuleCluster::MockClusterCascadesExtension03aClassExtends
1441
- eigenclass = class << self ; self ; end
1442
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1443
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1444
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1445
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1446
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1447
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1448
- extend ModuleCluster::MockClusterCascadesExtension03a
1449
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1450
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1451
- ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1452
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1453
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1454
- eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1455
- end
1456
- end
1457
-
1458
- ##############################################
1459
- # define_module_included_cascades_to_class #
1460
- ##############################################
1461
-
1462
- it 'can define includes and extends for module inclusion' do
1463
- module ModuleCluster::MockInclusionCascadesToClass01
1464
- extend ModuleCluster
1465
- module Mock1
1466
- end
1467
- module Mock2
1468
- end
1469
- module Mock3
1470
- end
1471
- define_module_included_cascades_to_class do |includes, extends|
1472
- includes.concat [ Mock1, Mock2 ]
1473
- extends.concat [ Mock3 ]
1474
- end
1475
- end
1476
- module ModuleCluster::MockInclusionCascadesToClass01a
1477
- eigenclass = class << self ; self ; end
1478
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1479
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1480
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1481
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1482
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1483
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1484
- include ModuleCluster::MockInclusionCascadesToClass01
1485
- methods.include?( :included ).should == true
1486
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1487
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1488
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1489
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1490
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1491
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1492
- end
1493
- class ModuleCluster::MockInclusionCascadesToClass01ClassIncludes
1494
- eigenclass = class << self ; self ; end
1495
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1496
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1497
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1498
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1499
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1500
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1501
- include ModuleCluster::MockInclusionCascadesToClass01a
1502
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == true
1503
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == true
1504
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1505
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1506
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1507
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == true
1508
- end
1509
- class ModuleCluster::MockInclusionCascadesToClass01ClassExtends
1510
- eigenclass = class << self ; self ; end
1511
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1512
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1513
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1514
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1515
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1516
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1517
- extend ModuleCluster::MockInclusionCascadesToClass01a
1518
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1519
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1520
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1521
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1522
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1523
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1524
- end
1525
- module ModuleCluster::MockInclusionCascadesToClass02
1526
- extend ModuleCluster
1527
- module Mock1
1528
- end
1529
- module Mock2
1530
- end
1531
- module Mock3
1532
- end
1533
- define_module_included_cascades_to_class do |includes, extends|
1534
- includes.concat [ Mock1, Mock2 ]
1535
- end
1536
- end
1537
- class ModuleCluster::MockInclusionCascadesToClass02ClassIncludes
1538
- eigenclass = class << self ; self ; end
1539
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1540
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1541
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1542
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1543
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1544
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1545
- include ModuleCluster::MockInclusionCascadesToClass02
1546
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == true
1547
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == true
1548
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1549
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1550
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1551
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1552
- end
1553
- class ModuleCluster::MockInclusionCascadesToClass02ClassExtends
1554
- eigenclass = class << self ; self ; end
1555
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1556
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1557
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1558
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1559
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1560
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1561
- extend ModuleCluster::MockInclusionCascadesToClass02
1562
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1563
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1564
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1565
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1566
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1567
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1568
- end
1569
- module ModuleCluster::MockInclusionCascadesToClass02a
1570
- eigenclass = class << self ; self ; end
1571
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1572
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1573
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1574
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1575
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1576
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1577
- include ModuleCluster::MockInclusionCascadesToClass02
1578
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1579
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1580
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1581
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1582
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1583
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1584
- end
1585
- class ModuleCluster::MockInclusionCascadesToClass02aClassIncludes
1586
- eigenclass = class << self ; self ; end
1587
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1588
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1589
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1590
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1591
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1592
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1593
- include ModuleCluster::MockInclusionCascadesToClass02a
1594
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == true
1595
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == true
1596
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1597
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1598
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1599
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1600
- end
1601
- class ModuleCluster::MockInclusionCascadesToClass02aClassExtends
1602
- eigenclass = class << self ; self ; end
1603
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1604
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1605
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1606
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1607
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1608
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1609
- extend ModuleCluster::MockInclusionCascadesToClass02a
1610
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1611
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1612
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1613
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1614
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1615
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1616
- end
1617
- module ModuleCluster::MockInclusionCascadesToClass03
1618
- extend ModuleCluster
1619
- module Mock1
1620
- end
1621
- module Mock2
1622
- end
1623
- module Mock3
1624
- end
1625
- define_module_included_cascades_to_class do |includes, extends|
1626
- extends.concat [ Mock3 ]
1627
- end
1628
- end
1629
- class ModuleCluster::MockInclusionCascadesToClass03ClassIncludes
1630
- eigenclass = class << self ; self ; end
1631
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1632
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1633
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1634
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1635
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1636
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1637
- include ModuleCluster::MockInclusionCascadesToClass03
1638
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1639
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1640
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1641
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1642
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1643
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == true
1644
- end
1645
- class ModuleCluster::MockInclusionCascadesToClass03ClassExtends
1646
- eigenclass = class << self ; self ; end
1647
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1648
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1649
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1650
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1651
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1652
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1653
- extend ModuleCluster::MockInclusionCascadesToClass03
1654
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1655
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1656
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1657
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1658
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1659
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1660
- end
1661
- module ModuleCluster::MockInclusionCascadesToClass03a
1662
- eigenclass = class << self ; self ; end
1663
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1664
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1665
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1666
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1667
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1668
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1669
- include ModuleCluster::MockInclusionCascadesToClass03
1670
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1671
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1672
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1673
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1674
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1675
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1676
- end
1677
- class ModuleCluster::MockInclusionCascadesToClass03aClassIncludes
1678
- eigenclass = class << self ; self ; end
1679
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1680
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1681
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1682
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1683
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1684
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1685
- include ModuleCluster::MockInclusionCascadesToClass03a
1686
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1687
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1688
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1689
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1690
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1691
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == true
1692
- end
1693
- class ModuleCluster::MockInclusionCascadesToClass03aClassExtends
1694
- eigenclass = class << self ; self ; end
1695
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1696
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1697
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1698
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1699
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1700
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1701
- extend ModuleCluster::MockInclusionCascadesToClass03a
1702
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1703
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1704
- ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1705
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1706
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1707
- eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1708
- end
1709
- end
1710
-
1711
- ##############################################
1712
- # define_module_extended_cascades_to_class #
1713
- ##############################################
1714
-
1715
- it 'can define includes and extends for module extension' do
1716
- module ModuleCluster::MockExtensionCascadesToClass01
1717
- extend ModuleCluster
1718
- module Mock1
1719
- end
1720
- module Mock2
1721
- end
1722
- module Mock3
1723
- end
1724
- define_module_extended_cascades_to_class do |includes, extends|
1725
- includes.concat [ Mock1, Mock2 ]
1726
- extends.concat [ Mock3 ]
1727
- end
1728
- end
1729
- class ModuleCluster::MockExtensionCascadesToClass01ClassIncludes
1730
- eigenclass = class << self ; self ; end
1731
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1732
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1733
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1734
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1735
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1736
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1737
- include ModuleCluster::MockExtensionCascadesToClass01
1738
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1739
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1740
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1741
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1742
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1743
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1744
- end
1745
- class ModuleCluster::MockExtensionCascadesToClass01ClassExtends
1746
- eigenclass = class << self ; self ; end
1747
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1748
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1749
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1750
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1751
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1752
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1753
- extend ModuleCluster::MockExtensionCascadesToClass01
1754
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == true
1755
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == true
1756
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1757
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1758
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1759
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == true
1760
- end
1761
- module ModuleCluster::MockExtensionCascadesToClass01a
1762
- eigenclass = class << self ; self ; end
1763
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1764
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1765
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1766
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1767
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1768
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1769
- extend ModuleCluster::MockExtensionCascadesToClass01
1770
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1771
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1772
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1773
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1774
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1775
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1776
- end
1777
- class ModuleCluster::MockExtensionCascadesToClass01aClassIncludes
1778
- eigenclass = class << self ; self ; end
1779
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1780
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1781
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1782
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1783
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1784
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1785
- include ModuleCluster::MockExtensionCascadesToClass01a
1786
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1787
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1788
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1789
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1790
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1791
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1792
- end
1793
- class ModuleCluster::MockExtensionCascadesToClass01aClassExtends
1794
- eigenclass = class << self ; self ; end
1795
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1796
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1797
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1798
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1799
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1800
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1801
- extend ModuleCluster::MockExtensionCascadesToClass01a
1802
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == true
1803
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == true
1804
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1805
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1806
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1807
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == true
1808
- end
1809
- module ModuleCluster::MockExtensionCascadesToClass02
1810
- extend ModuleCluster
1811
- module Mock1
1812
- end
1813
- module Mock2
1814
- end
1815
- module Mock3
1816
- end
1817
- define_module_extended_cascades_to_class do |includes, extends|
1818
- includes.concat [ Mock1, Mock2 ]
1819
- end
1820
- end
1821
- class ModuleCluster::MockExtensionCascadesToClass02ClassIncludes
1822
- eigenclass = class << self ; self ; end
1823
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1824
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1825
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1826
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1827
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1828
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1829
- include ModuleCluster::MockExtensionCascadesToClass02
1830
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1831
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1832
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1833
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1834
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1835
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1836
- end
1837
- class ModuleCluster::MockExtensionCascadesToClass02ClassExtends
1838
- eigenclass = class << self ; self ; end
1839
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1840
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1841
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1842
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1843
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1844
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1845
- extend ModuleCluster::MockExtensionCascadesToClass02
1846
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == true
1847
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == true
1848
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1849
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1850
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1851
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1852
- end
1853
- module ModuleCluster::MockExtensionCascadesToClass02a
1854
- eigenclass = class << self ; self ; end
1855
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1856
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1857
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1858
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1859
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1860
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1861
- extend ModuleCluster::MockExtensionCascadesToClass02
1862
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1863
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1864
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1865
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1866
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1867
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1868
- end
1869
- class ModuleCluster::MockExtensionCascadesToClass02aClassIncludes
1870
- eigenclass = class << self ; self ; end
1871
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1872
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1873
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1874
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1875
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1876
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1877
- include ModuleCluster::MockExtensionCascadesToClass02a
1878
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1879
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1880
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1881
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1882
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1883
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1884
- end
1885
- class ModuleCluster::MockExtensionCascadesToClass02aClassExtends
1886
- eigenclass = class << self ; self ; end
1887
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1888
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1889
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1890
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1891
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1892
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1893
- extend ModuleCluster::MockExtensionCascadesToClass02a
1894
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == true
1895
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == true
1896
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1897
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1898
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1899
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1900
- end
1901
- module ModuleCluster::MockExtensionCascadesToClass03
1902
- extend ModuleCluster
1903
- module Mock1
1904
- end
1905
- module Mock2
1906
- end
1907
- module Mock3
1908
- end
1909
- define_module_extended_cascades_to_class do |includes, extends|
1910
- extends.concat [ Mock3 ]
1911
- end
1912
- end
1913
- class ModuleCluster::MockExtensionCascadesToClass03ClassIncludes
1914
- eigenclass = class << self ; self ; end
1915
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1916
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1917
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1918
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1919
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1920
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1921
- include ModuleCluster::MockExtensionCascadesToClass03
1922
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1923
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1924
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1925
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1926
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1927
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1928
- end
1929
- class ModuleCluster::MockExtensionCascadesToClass03ClassExtends
1930
- eigenclass = class << self ; self ; end
1931
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1932
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1933
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1934
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1935
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1936
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1937
- extend ModuleCluster::MockExtensionCascadesToClass03
1938
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1939
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1940
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1941
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1942
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1943
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == true
1944
- end
1945
- module ModuleCluster::MockExtensionCascadesToClass03a
1946
- eigenclass = class << self ; self ; end
1947
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1948
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1949
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1950
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1951
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1952
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1953
- extend ModuleCluster::MockExtensionCascadesToClass03
1954
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1955
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1956
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1957
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1958
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1959
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1960
- end
1961
- class ModuleCluster::MockExtensionCascadesToClass03aClassIncludes
1962
- eigenclass = class << self ; self ; end
1963
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1964
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1965
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1966
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1967
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1968
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1969
- include ModuleCluster::MockExtensionCascadesToClass03a
1970
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1971
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1972
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1973
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1974
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1975
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1976
- end
1977
- class ModuleCluster::MockExtensionCascadesToClass03aClassExtends
1978
- eigenclass = class << self ; self ; end
1979
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1980
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1981
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1982
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1983
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1984
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1985
- extend ModuleCluster::MockExtensionCascadesToClass03a
1986
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1987
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1988
- ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1989
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1990
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1991
- eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == true
1992
- end
1993
- end
1994
-
1995
- #############################################
1996
- # define_module_cluster_cascades_to_class #
1997
- #############################################
1998
-
1999
- it 'can define includes and extends for module extension and inclusion' do
2000
- module ModuleCluster::MockClusterClassCascadesInclusion01
2001
- extend ModuleCluster
2002
- module Mock1
2003
- end
2004
- module Mock2
2005
- end
2006
- module Mock3
2007
- end
2008
- define_module_cluster_cascades_to_class do |includes, extends|
2009
- includes.concat [ Mock1, Mock2 ]
2010
- extends.concat [ Mock3 ]
2011
- end
2012
- end
2013
- class ModuleCluster::MockClusterClassCascadesInclusion01ClassIncludes
2014
- eigenclass = class << self ; self ; end
2015
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2016
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2017
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2018
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2019
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2020
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2021
- include ModuleCluster::MockClusterClassCascadesInclusion01
2022
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2023
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2024
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2025
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2026
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2027
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2028
- end
2029
- class ModuleCluster::MockClusterClassCascadesInclusion01ClassExtends
2030
- eigenclass = class << self ; self ; end
2031
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2032
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2033
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2034
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2035
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2036
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2037
- extend ModuleCluster::MockClusterClassCascadesInclusion01
2038
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2039
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2040
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2041
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2042
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2043
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2044
- end
2045
- module ModuleCluster::MockClusterClassCascadesInclusion01a
2046
- eigenclass = class << self ; self ; end
2047
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2048
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2049
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2050
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2051
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2052
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2053
- include ModuleCluster::MockClusterClassCascadesInclusion01
2054
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2055
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2056
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2057
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2058
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2059
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2060
- end
2061
- class ModuleCluster::MockClusterClassCascadesInclusion01aClassIncludes
2062
- eigenclass = class << self ; self ; end
2063
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2064
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2065
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2066
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2067
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2068
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2069
- include ModuleCluster::MockClusterClassCascadesInclusion01a
2070
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2071
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2072
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2073
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2074
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2075
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2076
- end
2077
- class ModuleCluster::MockClusterClassCascadesInclusion01aClassExtends
2078
- eigenclass = class << self ; self ; end
2079
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2080
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2081
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2082
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2083
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2084
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2085
- extend ModuleCluster::MockClusterClassCascadesInclusion01a
2086
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2087
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2088
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2089
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2090
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2091
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2092
- end
2093
- module ModuleCluster::MockClusterClassCascadesInclusion02
2094
- extend ModuleCluster
2095
- module Mock1
2096
- end
2097
- module Mock2
2098
- end
2099
- module Mock3
2100
- end
2101
- define_module_cluster_cascades_to_class do |includes, extends|
2102
- includes.concat [ Mock1, Mock2 ]
2103
- end
2104
- end
2105
- class ModuleCluster::MockClusterClassCascadesInclusion02Includes
2106
- eigenclass = class << self ; self ; end
2107
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2108
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2109
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2110
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2111
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2112
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2113
- include ModuleCluster::MockClusterClassCascadesInclusion02
2114
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2115
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2116
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2117
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2118
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2119
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2120
- end
2121
- class ModuleCluster::MockClusterClassCascadesInclusion02Extends
2122
- eigenclass = class << self ; self ; end
2123
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2124
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2125
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2126
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2127
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2128
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2129
- extend ModuleCluster::MockClusterClassCascadesInclusion02
2130
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2131
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2132
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2133
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2134
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2135
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2136
- end
2137
- module ModuleCluster::MockClusterClassCascadesInclusion02a
2138
- eigenclass = class << self ; self ; end
2139
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2140
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2141
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2142
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2143
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2144
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2145
- include ModuleCluster::MockClusterClassCascadesInclusion02
2146
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2147
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2148
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2149
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2150
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2151
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2152
- end
2153
- class ModuleCluster::MockClusterClassCascadesInclusion02aClassIncludes
2154
- eigenclass = class << self ; self ; end
2155
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2156
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2157
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2158
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2159
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2160
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2161
- include ModuleCluster::MockClusterClassCascadesInclusion02a
2162
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2163
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2164
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2165
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2166
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2167
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2168
- end
2169
- class ModuleCluster::MockClusterClassCascadesInclusion02aClassExtends
2170
- eigenclass = class << self ; self ; end
2171
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2172
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2173
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2174
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2175
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2176
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2177
- extend ModuleCluster::MockClusterClassCascadesInclusion02a
2178
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2179
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2180
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2181
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2182
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2183
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2184
- end
2185
- module ModuleCluster::MockClusterClassCascadesInclusion03
2186
- extend ModuleCluster
2187
- module Mock1
2188
- end
2189
- module Mock2
2190
- end
2191
- module Mock3
2192
- end
2193
- define_module_cluster_cascades_to_class do |includes, extends|
2194
- extends.concat [ Mock3 ]
2195
- end
2196
- end
2197
- class ModuleCluster::MockClusterClassCascadesInclusion03ClassIncludes
2198
- eigenclass = class << self ; self ; end
2199
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2200
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2201
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2202
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2203
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2204
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2205
- include ModuleCluster::MockClusterClassCascadesInclusion03
2206
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2207
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2208
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2209
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2210
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2211
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2212
- end
2213
- class ModuleCluster::MockClusterClassCascadesInclusion03ClassExtends
2214
- eigenclass = class << self ; self ; end
2215
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2216
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2217
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2218
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2219
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2220
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2221
- extend ModuleCluster::MockClusterClassCascadesInclusion03
2222
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2223
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2224
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2225
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2226
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2227
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2228
- end
2229
- module ModuleCluster::MockClusterClassCascadesInclusion03a
2230
- eigenclass = class << self ; self ; end
2231
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2232
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2233
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2234
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2235
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2236
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2237
- include ModuleCluster::MockClusterClassCascadesInclusion03
2238
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2239
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2240
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2241
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2242
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2243
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2244
- end
2245
- class ModuleCluster::MockClusterClassCascadesInclusion03aClassInclude
2246
- eigenclass = class << self ; self ; end
2247
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2248
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2249
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2250
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2251
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2252
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2253
- include ModuleCluster::MockClusterClassCascadesInclusion03a
2254
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2255
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2256
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2257
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2258
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2259
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2260
- end
2261
- class ModuleCluster::MockClusterClassCascadesInclusion03aClassExtends
2262
- eigenclass = class << self ; self ; end
2263
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2264
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2265
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2266
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2267
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2268
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2269
- extend ModuleCluster::MockClusterClassCascadesInclusion03a
2270
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2271
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2272
- ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2273
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2274
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2275
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2276
- end
2277
- module ModuleCluster::MockClusterClassCascadesExtension01
2278
- extend ModuleCluster
2279
- module Mock1
2280
- end
2281
- module Mock2
2282
- end
2283
- module Mock3
2284
- end
2285
- define_module_cluster_cascades_to_class do |includes, extends|
2286
- includes.concat [ Mock1, Mock2 ]
2287
- extends.concat [ Mock3 ]
2288
- end
2289
- end
2290
- class ModuleCluster::MockClusterClassCascadesExtension01ClassIncludes
2291
- eigenclass = class << self ; self ; end
2292
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2293
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2294
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2295
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2296
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2297
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2298
- include ModuleCluster::MockClusterClassCascadesExtension01
2299
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2300
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2301
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2302
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2303
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2304
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2305
- end
2306
- class ModuleCluster::MockClusterClassCascadesExtension01ClassExtends
2307
- eigenclass = class << self ; self ; end
2308
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2309
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2310
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2311
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2312
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2313
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2314
- extend ModuleCluster::MockClusterClassCascadesExtension01
2315
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2316
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2317
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2318
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2319
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2320
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2321
- end
2322
- module ModuleCluster::MockClusterClassCascadesExtension01a
2323
- eigenclass = class << self ; self ; end
2324
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2325
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2326
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2327
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2328
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2329
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2330
- extend ModuleCluster::MockClusterClassCascadesExtension01
2331
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2332
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2333
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2334
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2335
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2336
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2337
- end
2338
- class ModuleCluster::MockClusterClassCascadesExtension01aClassIncludes
2339
- eigenclass = class << self ; self ; end
2340
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2341
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2342
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2343
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2344
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2345
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2346
- include ModuleCluster::MockClusterClassCascadesExtension01a
2347
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2348
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2349
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2350
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2351
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2352
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2353
- end
2354
- class ModuleCluster::MockClusterClassCascadesExtension01aClassExtends
2355
- eigenclass = class << self ; self ; end
2356
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2357
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2358
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2359
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2360
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2361
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2362
- extend ModuleCluster::MockClusterClassCascadesExtension01a
2363
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2364
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2365
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2366
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2367
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2368
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2369
- end
2370
- module ModuleCluster::MockClusterClassCascadesExtension02
2371
- extend ModuleCluster
2372
- module Mock1
2373
- end
2374
- module Mock2
2375
- end
2376
- module Mock3
2377
- end
2378
- define_module_cluster_cascades_to_class do |includes, extends|
2379
- includes.concat [ Mock1, Mock2 ]
2380
- end
2381
- end
2382
- class ModuleCluster::MockClusterClassCascadesExtension02ClassIncludes
2383
- eigenclass = class << self ; self ; end
2384
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2385
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2386
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2387
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2388
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2389
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2390
- include ModuleCluster::MockClusterClassCascadesExtension02
2391
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2392
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2393
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2394
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2395
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2396
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2397
- end
2398
- class ModuleCluster::MockClusterClassCascadesExtension02ClassExtends
2399
- eigenclass = class << self ; self ; end
2400
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2401
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2402
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2403
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2404
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2405
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2406
- extend ModuleCluster::MockClusterClassCascadesExtension02
2407
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2408
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2409
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2410
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2411
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2412
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2413
- end
2414
- module ModuleCluster::MockClusterClassCascadesExtension02a
2415
- eigenclass = class << self ; self ; end
2416
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2417
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2418
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2419
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2420
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2421
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2422
- extend ModuleCluster::MockClusterClassCascadesExtension02
2423
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2424
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2425
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2426
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2427
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2428
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2429
- end
2430
- class ModuleCluster::MockClusterClassCascadesExtension02aClassIncludes
2431
- eigenclass = class << self ; self ; end
2432
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2433
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2434
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2435
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2436
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2437
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2438
- include ModuleCluster::MockClusterClassCascadesExtension02a
2439
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2440
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2441
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2442
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2443
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2444
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2445
- end
2446
- class ModuleCluster::MockClusterClassCascadesExtension02aClassExtends
2447
- eigenclass = class << self ; self ; end
2448
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2449
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2450
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2451
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2452
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2453
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2454
- extend ModuleCluster::MockClusterClassCascadesExtension02a
2455
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2456
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2457
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2458
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2459
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2460
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2461
- end
2462
- module ModuleCluster::MockClusterClassCascadesExtension03
2463
- extend ModuleCluster
2464
- module Mock1
2465
- end
2466
- module Mock2
2467
- end
2468
- module Mock3
2469
- end
2470
- define_module_cluster_cascades_to_class do |includes, extends|
2471
- extends.concat [ Mock3 ]
2472
- end
2473
- end
2474
- class ModuleCluster::MockClusterClassCascadesExtension03ClassIncludes
2475
- eigenclass = class << self ; self ; end
2476
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2477
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2478
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2479
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2480
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2481
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2482
- include ModuleCluster::MockClusterClassCascadesExtension03
2483
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2484
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2485
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2486
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2487
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2488
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2489
- end
2490
- class ModuleCluster::MockClusterClassCascadesExtension03ClassExtends
2491
- eigenclass = class << self ; self ; end
2492
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2493
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2494
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2495
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2496
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2497
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2498
- extend ModuleCluster::MockClusterClassCascadesExtension03
2499
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2500
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2501
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2502
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2503
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2504
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2505
- end
2506
- module ModuleCluster::MockClusterClassCascadesExtension03a
2507
- eigenclass = class << self ; self ; end
2508
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2509
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2510
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2511
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2512
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2513
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2514
- extend ModuleCluster::MockClusterClassCascadesExtension03
2515
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2516
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2517
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2518
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2519
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2520
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2521
- end
2522
- class ModuleCluster::MockClusterClassCascadesExtension03aClassIncludes
2523
- eigenclass = class << self ; self ; end
2524
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2525
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2526
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2527
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2528
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2529
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2530
- include ModuleCluster::MockClusterClassCascadesExtension03a
2531
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2532
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2533
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2534
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2535
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2536
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2537
- end
2538
- class ModuleCluster::MockClusterClassCascadesExtension03aClassExtends
2539
- eigenclass = class << self ; self ; end
2540
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2541
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2542
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2543
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2544
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2545
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2546
- extend ModuleCluster::MockClusterClassCascadesExtension03a
2547
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2548
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2549
- ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2550
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2551
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2552
- eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2553
- end
2554
- end
2555
-
13
+
2556
14
  end