module-cluster 1.4.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/README.md +127 -337
  2. data/lib/module-cluster.rb +1 -153
  3. data/lib/module/cluster.rb +341 -0
  4. data/lib/module/cluster/class_support.rb +22 -0
  5. data/lib/module/cluster/cluster.rb +10 -0
  6. data/lib/module/cluster/cluster/cluster_interface.rb +550 -0
  7. data/lib/module/cluster/exception/module_not_in_stack.rb +26 -0
  8. data/lib/module/cluster/instance_controller.rb +14 -0
  9. data/lib/module/cluster/instance_controller/hook_controller.rb +33 -0
  10. data/lib/module/cluster/instance_controller/hook_controller/chain_proxy.rb +511 -0
  11. data/lib/module/cluster/instance_controller/hook_controller/hook_controller_interface.rb +830 -0
  12. data/lib/module/cluster/instance_controller/instance_controller_interface.rb +269 -0
  13. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb +359 -0
  14. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb +442 -0
  15. data/lib/module/cluster/module_support.rb +67 -0
  16. data/lib/module/namespaces.rb +13 -0
  17. data/lib/module/requires.rb +32 -0
  18. data/spec/module/cluster/cluster_spec.rb +473 -0
  19. data/spec/module/cluster/instance_controller/hook_controller_spec.rb +922 -0
  20. data/spec/module/cluster/instance_controller/multiple_hook_controller_proxy_spec.rb +1240 -0
  21. data/spec/module/cluster_spec.rb +1794 -0
  22. metadata +27 -98
  23. data/README.rdoc +0 -395
  24. data/lib/module-cluster/ModuleCluster.rb +0 -9
  25. data/lib/module-cluster/ModuleCluster/Define.rb +0 -12
  26. data/lib/module-cluster/ModuleCluster/Define/Block.rb +0 -9
  27. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClass.rb +0 -83
  28. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClassOrModule.rb +0 -70
  29. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModule.rb +0 -79
  30. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModuleOrSubclass.rb +0 -21
  31. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +0 -77
  32. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +0 -78
  33. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +0 -78
  34. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +0 -78
  35. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +0 -36
  36. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +0 -29
  37. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +0 -45
  38. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +0 -77
  39. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +0 -78
  40. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +0 -29
  41. data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +0 -56
  42. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +0 -193
  43. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +0 -128
  44. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +0 -181
  45. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +0 -185
  46. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +0 -181
  47. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +0 -181
  48. data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +0 -40
  49. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +0 -45
  50. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +0 -193
  51. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +0 -209
  52. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +0 -128
  53. data/lib/module-cluster/ModuleCluster/Define/Status.rb +0 -106
  54. data/lib/module-cluster/ModuleCluster/Suspend.rb +0 -7
  55. data/lib/module-cluster/ModuleCluster/Suspend/Hooks.rb +0 -315
  56. data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +0 -153
  57. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +0 -77
  58. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +0 -44
  59. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +0 -292
  60. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/Subclass.rb +0 -24
  61. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +0 -12
  62. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +0 -9
  63. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +0 -36
  64. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Inherited.rb +0 -20
  65. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +0 -20
  66. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +0 -36
  67. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +0 -6
  68. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +0 -140
  69. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +0 -110
  70. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +0 -140
  71. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +0 -110
  72. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +0 -35
  73. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb +0 -359
  74. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb +0 -55
  75. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb +0 -199
  76. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +0 -34
  77. data/spec/ModuleCluster/Define/Block/CascadingClassOrModule_spec.rb +0 -285
  78. data/spec/ModuleCluster/Define/Block/CascadingClass_spec.rb +0 -254
  79. data/spec/ModuleCluster/Define/Block/CascadingModuleOrSubclass_spec.rb +0 -56
  80. data/spec/ModuleCluster/Define/Block/CascadingModule_spec.rb +0 -278
  81. data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +0 -230
  82. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +0 -238
  83. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +0 -54
  84. data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +0 -231
  85. data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +0 -54
  86. data/spec/ModuleCluster/Define/Block/Class_spec.rb +0 -224
  87. data/spec/ModuleCluster/Define/Block/Instance_spec.rb +0 -78
  88. data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +0 -54
  89. data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +0 -51
  90. data/spec/ModuleCluster/Define/Block/Module_spec.rb +0 -230
  91. data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +0 -73
  92. data/spec/ModuleCluster/Define/Block_spec.rb +0 -18
  93. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +0 -728
  94. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +0 -576
  95. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +0 -659
  96. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +0 -678
  97. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +0 -644
  98. data/spec/ModuleCluster/Define/Cluster_spec.rb +0 -708
  99. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +0 -102
  100. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +0 -728
  101. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +0 -728
  102. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +0 -576
  103. data/spec/ModuleCluster/Suspend/Hooks_spec.rb +0 -573
  104. data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +0 -559
  105. data/spec/ModuleCluster_spec.rb +0 -15
  106. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +0 -386
  107. data/spec/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy_spec.rb +0 -419
  108. data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +0 -242
@@ -1,659 +0,0 @@
1
-
2
- require_relative '../../../lib/module-cluster.rb'
3
-
4
- describe ::ModuleCluster::Define::ClusterCascadesToClass do
5
-
6
- ##########################
7
- # self.should_cascade? #
8
- ##########################
9
-
10
- it 'should cascade to classes' do
11
- ::ModuleCluster::Define::ClusterCascadesToClass.should_cascade?( Kernel ).should == true
12
- ::ModuleCluster::Define::ClusterCascadesToClass.should_cascade?( Class ).should == false
13
- ::ModuleCluster::Define::ClusterCascadesToClass.should_cascade?( Object.new ).should == false
14
- end
15
-
16
- ########################################
17
- # include_cascades_includes_to_class #
18
- ########################################
19
-
20
- it 'include modules for any class this module or any including modules are included in' do
21
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock01
22
- extend ::ModuleCluster::Define::ClusterCascadesToClass
23
- module Module1
24
- end
25
- module Module2
26
- end
27
- include_cascades_includes_to_class( Module1, Module2 ).name = :some_name
28
- respond_to?( :included ).should == true
29
- module ModuleProof1
30
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock01
31
- eigenclass = class << self ; self ; end
32
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
33
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
34
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
35
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
36
- end
37
- class ClassProof
38
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock01
39
- eigenclass = class << self ; self ; end
40
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
41
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
42
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == true
43
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == true
44
- end
45
- module ModuleProof2
46
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::ModuleProof1
47
- eigenclass = class << self ; self ; end
48
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
49
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
50
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
51
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
52
- end
53
- class ClassProof2
54
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::ModuleProof1
55
- eigenclass = class << self ; self ; end
56
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == false
57
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == false
58
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module1 ).should == true
59
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock01::Module2 ).should == true
60
- end
61
- end
62
- end
63
-
64
- #######################################
65
- # include_cascades_extends_to_class #
66
- #######################################
67
-
68
- it 'extends modules for any class this module or any including modules are included in' do
69
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock02
70
- extend ::ModuleCluster::Define::ClusterCascadesToClass
71
- module Module1
72
- end
73
- module Module2
74
- end
75
- include_cascades_extends_to_class( Module1, Module2 ).name = :some_name
76
- respond_to?( :included ).should == true
77
- module ModuleProof1
78
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock02
79
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
80
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
81
- eigenclass = class << self ; self ; end
82
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
83
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
84
- end
85
- class ClassProof
86
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock02
87
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
88
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
89
- eigenclass = class << self ; self ; end
90
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == true
91
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == true
92
- end
93
- module ModuleProof2
94
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::ModuleProof1
95
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
96
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
97
- eigenclass = class << self ; self ; end
98
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
99
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
100
- end
101
- class ClassProof2
102
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::ModuleProof1
103
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == false
104
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == false
105
- eigenclass = class << self ; self ; end
106
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module1 ).should == true
107
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock02::Module2 ).should == true
108
- end
109
- end
110
- end
111
-
112
- ####################################################
113
- # include_cascades_includes_and_extends_to_class #
114
- ####################################################
115
-
116
- it 'include and extends modules for any class this module or any including modules are included in' do
117
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock03
118
- extend ::ModuleCluster::Define::ClusterCascadesToClass
119
- module Module1
120
- end
121
- module Module2
122
- end
123
- include_cascades_includes_and_extends_to_class( Module1, Module2 ).name = :some_name
124
- respond_to?( :included ).should == true
125
- module ModuleProof1
126
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock03
127
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == false
128
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == false
129
- eigenclass = class << self ; self ; end
130
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == false
131
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == false
132
- end
133
- class ClassProof
134
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock03
135
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == true
136
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == true
137
- eigenclass = class << self ; self ; end
138
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == true
139
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == true
140
- end
141
- module ModuleProof2
142
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::ModuleProof1
143
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == false
144
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == false
145
- eigenclass = class << self ; self ; end
146
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == false
147
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == false
148
- end
149
- class ClassProof2
150
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::ModuleProof1
151
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == true
152
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == true
153
- eigenclass = class << self ; self ; end
154
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module1 ).should == true
155
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock03::Module2 ).should == true
156
- end
157
- end
158
- end
159
-
160
- #######################################
161
- # extend_cascades_includes_to_class #
162
- #######################################
163
-
164
- it 'include modules for any class this module is extended in' do
165
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock04
166
- extend ::ModuleCluster::Define::ClusterCascadesToClass
167
- module Module1
168
- end
169
- module Module2
170
- end
171
- extend_cascades_includes_to_class( Module1, Module2 ).name = :some_name
172
- respond_to?( :extended ).should == true
173
- module ModuleProof1
174
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04
175
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
176
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
177
- eigenclass = class << self ; self ; end
178
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
179
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
180
- end
181
- class ClassProof
182
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04
183
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == true
184
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == true
185
- eigenclass = class << self ; self ; end
186
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
187
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
188
- end
189
- Object.new.instance_eval do
190
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::ModuleProof1
191
- eigenclass = class << self ; self ; end
192
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
193
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
194
- end
195
- module ModuleProof2
196
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::ModuleProof1
197
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
198
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
199
- eigenclass = class << self ; self ; end
200
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
201
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
202
- end
203
- class ClassProof2
204
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::ModuleProof1
205
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == true
206
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == true
207
- eigenclass = class << self ; self ; end
208
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
209
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
210
- end
211
- Object.new.instance_eval do
212
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::ModuleProof1
213
- eigenclass = class << self ; self ; end
214
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module1 ).should == false
215
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock04::Module2 ).should == false
216
- end
217
- end
218
- end
219
-
220
- ######################################
221
- # extend_cascades_extends_to_class #
222
- ######################################
223
-
224
- it 'extend modules for any class this module is extended in' do
225
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock05
226
- extend ::ModuleCluster::Define::ClusterCascadesToClass
227
- module Module1
228
- end
229
- module Module2
230
- end
231
- extend_cascades_extends_to_class( Module1, Module2 ).name = :some_name
232
- respond_to?( :extended ).should == true
233
- module ModuleProof1
234
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05
235
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
236
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
237
- eigenclass = class << self ; self ; end
238
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
239
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
240
- end
241
- class ClassProof
242
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05
243
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
244
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
245
- eigenclass = class << self ; self ; end
246
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == true
247
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == true
248
- end
249
- Object.new.instance_eval do
250
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::ModuleProof1
251
- eigenclass = class << self ; self ; end
252
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
253
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
254
- end
255
- module ModuleProof2
256
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::ModuleProof1
257
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
258
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
259
- eigenclass = class << self ; self ; end
260
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
261
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
262
- end
263
- class ClassProof2
264
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::ModuleProof1
265
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
266
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
267
- eigenclass = class << self ; self ; end
268
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == true
269
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == true
270
- end
271
- Object.new.instance_eval do
272
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::ModuleProof1
273
- eigenclass = class << self ; self ; end
274
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module1 ).should == false
275
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock05::Module2 ).should == false
276
- end
277
- end
278
- end
279
-
280
- ###################################################
281
- # extend_cascades_includes_and_extends_to_class #
282
- ###################################################
283
-
284
- it 'include and extend modules for any class this module is extended in' do
285
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock06
286
- extend ::ModuleCluster::Define::ClusterCascadesToClass
287
- module Module1
288
- end
289
- module Module2
290
- end
291
- extend_cascades_includes_and_extends_to_class( Module1, Module2 ).name = :some_name
292
- respond_to?( :extended ).should == true
293
- module ModuleProof1
294
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06
295
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
296
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
297
- eigenclass = class << self ; self ; end
298
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
299
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
300
- end
301
- class ClassProof
302
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06
303
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == true
304
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == true
305
- eigenclass = class << self ; self ; end
306
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == true
307
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == true
308
- end
309
- Object.new.instance_eval do
310
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::ModuleProof1
311
- eigenclass = class << self ; self ; end
312
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
313
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
314
- end
315
- module ModuleProof2
316
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::ModuleProof1
317
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
318
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
319
- eigenclass = class << self ; self ; end
320
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
321
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
322
- end
323
- class ClassProof2
324
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::ModuleProof1
325
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == true
326
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == true
327
- eigenclass = class << self ; self ; end
328
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == true
329
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == true
330
- end
331
- Object.new.instance_eval do
332
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::ModuleProof1
333
- eigenclass = class << self ; self ; end
334
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module1 ).should == false
335
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock06::Module2 ).should == false
336
- end
337
- end
338
- end
339
-
340
- ###################################################
341
- # include_cascades_to_class_prepend_includes #
342
- ###################################################
343
-
344
- it 'include other modules for any class this module or any including modules are included in, before this module or including module is included' do
345
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock07
346
- extend ::ModuleCluster::Define::ClusterCascadesToClass
347
- module Module1
348
- end
349
- module Module2
350
- end
351
- include_cascades_to_class_prepend_includes( Module1, Module2 ).name = :some_name
352
- respond_to?( :append_features ).should == true
353
- module ModuleProof1
354
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock07
355
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
356
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
357
- eigenclass = class << self ; self ; end
358
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
359
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
360
- end
361
- class ClassProof
362
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock07
363
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == true
364
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == true
365
- eigenclass = class << self ; self ; end
366
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
367
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
368
- end
369
- module ModuleProof2
370
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::ModuleProof1
371
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
372
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
373
- eigenclass = class << self ; self ; end
374
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
375
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
376
- end
377
- class ClassProof2
378
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::ModuleProof1
379
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == true
380
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == true
381
- eigenclass = class << self ; self ; end
382
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module1 ).should == false
383
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock07::Module2 ).should == false
384
- end
385
- end
386
- end
387
-
388
- ##################################################
389
- # include_cascades_to_class_prepend_extends #
390
- ##################################################
391
-
392
- it 'extend other modules for any class this module or any including modules are included in, before this module or including module is included' do
393
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock08
394
- extend ::ModuleCluster::Define::ClusterCascadesToClass
395
- module Module1
396
- end
397
- module Module2
398
- end
399
- include_cascades_to_class_prepend_extends( Module1, Module2 ).name = :some_name
400
- respond_to?( :append_features ).should == true
401
- module ModuleProof1
402
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock08
403
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
404
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
405
- eigenclass = class << self ; self ; end
406
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
407
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
408
- end
409
- class ClassProof
410
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock08
411
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
412
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
413
- eigenclass = class << self ; self ; end
414
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == true
415
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == true
416
- end
417
- module ModuleProof2
418
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::ModuleProof1
419
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
420
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
421
- eigenclass = class << self ; self ; end
422
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
423
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
424
- end
425
- class ClassProof2
426
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::ModuleProof1
427
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == false
428
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == false
429
- eigenclass = class << self ; self ; end
430
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module1 ).should == true
431
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock08::Module2 ).should == true
432
- end
433
- end
434
- end
435
-
436
- ###############################################################
437
- # include_cascades_to_class_prepend_includes_and_extends #
438
- ###############################################################
439
-
440
- it 'include and extend other modules for any class this module or any including modules are included in, before this module or including module is included' do
441
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock09
442
- extend ::ModuleCluster::Define::ClusterCascadesToClass
443
- module Module1
444
- end
445
- module Module2
446
- end
447
- include_cascades_to_class_prepend_includes_and_extends( Module1, Module2 ).name = :some_name
448
- respond_to?( :append_features ).should == true
449
- module ModuleProof1
450
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock09
451
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == false
452
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == false
453
- eigenclass = class << self ; self ; end
454
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == false
455
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == false
456
- end
457
- class ClassProof
458
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock09
459
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == true
460
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == true
461
- eigenclass = class << self ; self ; end
462
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == true
463
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == true
464
- end
465
- module ModuleProof2
466
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::ModuleProof1
467
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == false
468
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == false
469
- eigenclass = class << self ; self ; end
470
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == false
471
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == false
472
- end
473
- class ClassProof2
474
- include ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::ModuleProof1
475
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == true
476
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == true
477
- eigenclass = class << self ; self ; end
478
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module1 ).should == true
479
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock09::Module2 ).should == true
480
- end
481
- end
482
- end
483
-
484
- ##################################################
485
- # extend_cascades_to_class_prepend_includes #
486
- ##################################################
487
-
488
- it 'include other modules for any class this module or any including modules are included in, before this module is extended' do
489
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock10
490
- extend ::ModuleCluster::Define::ClusterCascadesToClass
491
- module Module1
492
- end
493
- module Module2
494
- end
495
- extend_cascades_to_class_prepend_includes( Module1, Module2 ).name = :some_name
496
- respond_to?( :extend_object ).should == true
497
- module ModuleProof1
498
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10
499
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
500
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
501
- eigenclass = class << self ; self ; end
502
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
503
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
504
- end
505
- class ClassProof
506
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::ModuleProof1
507
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == true
508
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == true
509
- eigenclass = class << self ; self ; end
510
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
511
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
512
- end
513
- Object.new.instance_eval do
514
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10
515
- eigenclass = class << self ; self ; end
516
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
517
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
518
- end
519
- module ModuleProof2
520
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::ModuleProof1
521
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
522
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
523
- eigenclass = class << self ; self ; end
524
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
525
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
526
- end
527
- class ClassProof2
528
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::ModuleProof1
529
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == true
530
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == true
531
- eigenclass = class << self ; self ; end
532
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
533
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
534
- end
535
- Object.new.instance_eval do
536
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::ModuleProof1
537
- eigenclass = class << self ; self ; end
538
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module1 ).should == false
539
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock10::Module2 ).should == false
540
- end
541
- end
542
- end
543
-
544
- #################################################
545
- # extend_cascades_to_class_prepend_extends #
546
- #################################################
547
-
548
- it 'extend other modules for any class this module or any including modules are included in, before this module is extended' do
549
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock11
550
- extend ::ModuleCluster::Define::ClusterCascadesToClass
551
- module Module1
552
- end
553
- module Module2
554
- end
555
- extend_cascades_to_class_prepend_extends( Module1, Module2 ).name = :some_name
556
- respond_to?( :extend_object ).should == true
557
- module ModuleProof1
558
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11
559
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
560
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
561
- eigenclass = class << self ; self ; end
562
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
563
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
564
- end
565
- class ClassProof
566
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11
567
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
568
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
569
- eigenclass = class << self ; self ; end
570
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == true
571
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == true
572
- end
573
- Object.new.instance_eval do
574
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::ModuleProof1
575
- eigenclass = class << self ; self ; end
576
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
577
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
578
- end
579
- module ModuleProof2
580
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::ModuleProof1
581
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
582
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
583
- eigenclass = class << self ; self ; end
584
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
585
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
586
- end
587
- class ClassProof2
588
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::ModuleProof1
589
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
590
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
591
- eigenclass = class << self ; self ; end
592
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == true
593
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == true
594
- end
595
- Object.new.instance_eval do
596
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::ModuleProof1
597
- eigenclass = class << self ; self ; end
598
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module1 ).should == false
599
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock11::Module2 ).should == false
600
- end
601
- end
602
- end
603
-
604
- ##############################################################
605
- # extend_cascades_to_class_prepend_includes_and_extends #
606
- ##############################################################
607
-
608
- it 'include and extend other modules for any class this module or any including modules are included in, before this module is extended' do
609
- module ::ModuleCluster::Define::ClusterCascadesToClass::Mock12
610
- extend ::ModuleCluster::Define::ClusterCascadesToClass
611
- module Module1
612
- end
613
- module Module2
614
- end
615
- extend_cascades_to_class_prepend_includes_and_extends( Module1, Module2 ).name = :some_name
616
- respond_to?( :extend_object ).should == true
617
- module ModuleProof1
618
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12
619
- end
620
- class ClassProof
621
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12
622
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == true
623
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == true
624
- eigenclass = class << self ; self ; end
625
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == true
626
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == true
627
- end
628
- Object.new.instance_eval do
629
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::ModuleProof1
630
- eigenclass = class << self ; self ; end
631
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == false
632
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == false
633
- end
634
- module ModuleProof2
635
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::ModuleProof1
636
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == false
637
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == false
638
- eigenclass = class << self ; self ; end
639
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == false
640
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == false
641
- end
642
- class ClassProof2
643
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::ModuleProof1
644
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == true
645
- ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == true
646
- eigenclass = class << self ; self ; end
647
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == true
648
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == true
649
- end
650
- Object.new.instance_eval do
651
- extend ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::ModuleProof1
652
- eigenclass = class << self ; self ; end
653
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module1 ).should == false
654
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ClusterCascadesToClass::Mock12::Module2 ).should == false
655
- end
656
- end
657
- end
658
-
659
- end