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,576 +0,0 @@
1
-
2
- require_relative '../../../lib/module-cluster.rb'
3
-
4
- describe ::ModuleCluster::Define::ModuleOrInstanceCluster do
5
-
6
- ####################################
7
- # self.should_include_or_extend? #
8
- ####################################
9
-
10
- it 'should return true if module or instance (not class), false otherwise' do
11
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_include_or_extend?( Kernel ).should == true
12
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_include_or_extend?( Class ).should == false
13
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_include_or_extend?( Object.new ).should == true
14
- end
15
-
16
- ##########################
17
- # self.should_cascade? #
18
- ##########################
19
-
20
- it 'should report false' do
21
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_cascade?( Kernel ).should == false
22
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_cascade?( Class ).should == false
23
- ::ModuleCluster::Define::ModuleOrInstanceCluster.should_cascade?( Object.new ).should == false
24
- end
25
-
26
- ##########################################################################
27
- # module_include_or_extend_or_instance_extend_also_includes_or_extends #
28
- ##########################################################################
29
-
30
- it 'can include a module when this one is included in a module or extend an instance when this one is used to extend an instance' do
31
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
32
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
33
- module Module1
34
- end
35
- module Module2
36
- end
37
- module_include_or_extend_or_instance_extend_also_includes_or_extends( Module1, Module2 ).name = :some_name
38
- respond_to?( :included ).should == true
39
- respond_to?( :extended ).should == true
40
- module ModuleProof
41
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
42
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == true
43
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == true
44
- eigenclass = class << self ; self ; end
45
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
46
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
47
- end
48
- module ModuleProof2
49
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
50
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
51
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
52
- eigenclass = class << self ; self ; end
53
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == true
54
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == true
55
- end
56
- class ClassProof
57
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
58
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
59
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
60
- eigenclass = class << self ; self ; end
61
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
62
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
63
- end
64
- class ClassProof2
65
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
66
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
67
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
68
- eigenclass = class << self ; self ; end
69
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == false
70
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == false
71
- end
72
- Object.new.instance_eval do
73
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01
74
- eigenclass = class << self ; self ; end
75
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module1 ).should == true
76
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock01::Module2 ).should == true
77
- end
78
- end
79
- end
80
-
81
- ##############################################################
82
- # module_include_or_extend_or_instance_extend_also_extends #
83
- ##############################################################
84
-
85
- it 'can include a module when this one is included in a module or extend with another module when this one is used to extend a module or extend an instance when this one is used to extend an instance' do
86
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
87
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
88
- module Module1
89
- end
90
- module Module2
91
- end
92
- module_include_or_extend_or_instance_extend_also_extends( Module1, Module2 ).name = :some_name
93
- respond_to?( :included ).should == true
94
- respond_to?( :extended ).should == true
95
- module ModuleProof
96
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
97
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
98
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
99
- eigenclass = class << self ; self ; end
100
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == true
101
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == true
102
- end
103
- module ModuleProof2
104
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
105
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
106
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
107
- eigenclass = class << self ; self ; end
108
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == true
109
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == true
110
- end
111
- class ClassProof
112
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
113
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
114
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
115
- eigenclass = class << self ; self ; end
116
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
117
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
118
- end
119
- class ClassProof2
120
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
121
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
122
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
123
- eigenclass = class << self ; self ; end
124
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == false
125
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == false
126
- end
127
- Object.new.instance_eval do
128
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02
129
- eigenclass = class << self ; self ; end
130
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module1 ).should == true
131
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock02::Module2 ).should == true
132
- end
133
- end
134
- end
135
-
136
- ################################################################
137
- # module_include_or_instance_extend_also_includes_or_extends #
138
- ################################################################
139
-
140
- it 'can include a module when this one is included in a module or extend with another module when this one is used to extend an instance' do
141
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
142
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
143
- module Module1
144
- end
145
- module Module2
146
- end
147
- module_include_or_instance_extend_also_includes_or_extends( Module1, Module2 ).name = :some_name
148
- respond_to?( :included ).should == true
149
- respond_to?( :extended ).should == true
150
- module ModuleProof
151
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
152
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == true
153
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == true
154
- eigenclass = class << self ; self ; end
155
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
156
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
157
- end
158
- module ModuleProof2
159
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
160
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
161
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
162
- eigenclass = class << self ; self ; end
163
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
164
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
165
- end
166
- class ClassProof
167
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
168
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
169
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
170
- eigenclass = class << self ; self ; end
171
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
172
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
173
- end
174
- class ClassProof2
175
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
176
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
177
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
178
- eigenclass = class << self ; self ; end
179
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == false
180
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == false
181
- end
182
- Object.new.instance_eval do
183
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03
184
- eigenclass = class << self ; self ; end
185
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module1 ).should == true
186
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock03::Module2 ).should == true
187
- end
188
- end
189
- end
190
-
191
- ####################################################
192
- # module_include_or_instance_extend_also_extends #
193
- ####################################################
194
-
195
- it 'can extend with another module when this one is included in a module or used to extend an instance' do
196
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
197
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
198
- module Module1
199
- end
200
- module Module2
201
- end
202
- module_include_or_instance_extend_also_extends( Module1, Module2 ).name = :some_name
203
- respond_to?( :included ).should == true
204
- respond_to?( :extended ).should == true
205
- module ModuleProof
206
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
207
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
208
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
209
- eigenclass = class << self ; self ; end
210
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == true
211
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == true
212
- end
213
- module ModuleProof2
214
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
215
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
216
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
217
- eigenclass = class << self ; self ; end
218
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
219
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
220
- end
221
- class ClassProof
222
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
223
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
224
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
225
- eigenclass = class << self ; self ; end
226
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
227
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
228
- end
229
- class ClassProof2
230
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
231
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
232
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
233
- eigenclass = class << self ; self ; end
234
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == false
235
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == false
236
- end
237
- Object.new.instance_eval do
238
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04
239
- eigenclass = class << self ; self ; end
240
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module1 ).should == true
241
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock04::Module2 ).should == true
242
- end
243
- end
244
- end
245
-
246
- ############################################
247
- # module_or_instance_extend_also_extends #
248
- ############################################
249
-
250
- it 'can extend with another module when this one is used to extend a module or instance' do
251
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
252
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
253
- module Module1
254
- end
255
- module Module2
256
- end
257
- module_or_instance_extend_also_extends( Module1, Module2 ).name = :some_name
258
- respond_to?( :included ).should == true
259
- respond_to?( :extended ).should == true
260
- module ModuleProof
261
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
262
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
263
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
264
- eigenclass = class << self ; self ; end
265
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
266
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
267
- end
268
- module ModuleProof2
269
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
270
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
271
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
272
- eigenclass = class << self ; self ; end
273
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == true
274
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == true
275
- end
276
- class ClassProof
277
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
278
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
279
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
280
- eigenclass = class << self ; self ; end
281
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
282
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
283
- end
284
- class ClassProof2
285
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
286
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
287
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
288
- eigenclass = class << self ; self ; end
289
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == false
290
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == false
291
- end
292
- Object.new.instance_eval do
293
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05
294
- eigenclass = class << self ; self ; end
295
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module1 ).should == true
296
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock05::Module2 ).should == true
297
- end
298
- end
299
- end
300
-
301
- ##############################################################################
302
- # module_include_or_extend_or_instance_extend_prepends_includes_or_extends #
303
- ##############################################################################
304
-
305
- it 'can include a module before this one is included in a module or extend an instance before this one is used to extend an instance' do
306
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
307
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
308
- module Module1
309
- end
310
- module Module2
311
- end
312
- module_include_or_extend_or_instance_extend_prepends_includes_or_extends( Module1, Module2 ).name = :some_name
313
- respond_to?( :included ).should == true
314
- respond_to?( :extended ).should == true
315
- module ModuleProof
316
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
317
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == true
318
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == true
319
- eigenclass = class << self ; self ; end
320
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
321
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
322
- end
323
- module ModuleProof2
324
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
325
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
326
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
327
- eigenclass = class << self ; self ; end
328
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == true
329
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == true
330
- end
331
- class ClassProof
332
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
333
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
334
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
335
- eigenclass = class << self ; self ; end
336
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
337
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
338
- end
339
- class ClassProof2
340
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
341
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
342
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
343
- eigenclass = class << self ; self ; end
344
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == false
345
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == false
346
- end
347
- Object.new.instance_eval do
348
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06
349
- eigenclass = class << self ; self ; end
350
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module1 ).should == true
351
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock06::Module2 ).should == true
352
- end
353
- end
354
- end
355
-
356
- ####################################################################
357
- # module_include_or_instance_extend_prepends_includes_or_extends #
358
- ####################################################################
359
-
360
- it 'can include a module before this one is included in a module or extend with another module before this one is used to extend a module or extend an instance before this one is used to extend an instance' do
361
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
362
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
363
- module Module1
364
- end
365
- module Module2
366
- end
367
- module_include_or_instance_extend_prepends_includes_or_extends( Module1, Module2 ).name = :some_name
368
- respond_to?( :included ).should == true
369
- respond_to?( :extended ).should == true
370
- module ModuleProof
371
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
372
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == true
373
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == true
374
- eigenclass = class << self ; self ; end
375
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
376
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
377
- end
378
- module ModuleProof2
379
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
380
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
381
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
382
- eigenclass = class << self ; self ; end
383
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
384
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
385
- end
386
- class ClassProof
387
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
388
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
389
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
390
- eigenclass = class << self ; self ; end
391
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
392
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
393
- end
394
- class ClassProof2
395
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
396
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
397
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
398
- eigenclass = class << self ; self ; end
399
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == false
400
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == false
401
- end
402
- Object.new.instance_eval do
403
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07
404
- eigenclass = class << self ; self ; end
405
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module1 ).should == true
406
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock07::Module2 ).should == true
407
- end
408
- end
409
- end
410
-
411
- ##################################################################
412
- # module_include_or_extend_or_instance_extend_prepends_extends #
413
- ##################################################################
414
-
415
- it 'can include a module before this one is included in a module or extend with another module before this one is used to extend an instance' do
416
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
417
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
418
- module Module1
419
- end
420
- module Module2
421
- end
422
- module_include_or_extend_or_instance_extend_prepends_extends( Module1, Module2 ).name = :some_name
423
- respond_to?( :included ).should == true
424
- respond_to?( :extended ).should == true
425
- module ModuleProof
426
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
427
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == true
428
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == true
429
- eigenclass = class << self ; self ; end
430
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
431
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
432
- end
433
- module ModuleProof2
434
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
435
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
436
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
437
- eigenclass = class << self ; self ; end
438
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
439
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
440
- end
441
- class ClassProof
442
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
443
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
444
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
445
- eigenclass = class << self ; self ; end
446
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
447
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
448
- end
449
- class ClassProof2
450
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
451
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
452
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
453
- eigenclass = class << self ; self ; end
454
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == false
455
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == false
456
- end
457
- Object.new.instance_eval do
458
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08
459
- eigenclass = class << self ; self ; end
460
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module1 ).should == true
461
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock08::Module2 ).should == true
462
- end
463
- end
464
- end
465
-
466
- ########################################################
467
- # module_include_or_instance_extend_prepends_extends #
468
- ########################################################
469
-
470
- it 'can extend with another module before this one is included in a module or used to extend an instance' do
471
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
472
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
473
- module Module1
474
- end
475
- module Module2
476
- end
477
- module_include_or_instance_extend_prepends_extends( Module1, Module2 ).name = :some_name
478
- respond_to?( :included ).should == true
479
- respond_to?( :extended ).should == true
480
- module ModuleProof
481
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
482
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
483
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
484
- eigenclass = class << self ; self ; end
485
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == true
486
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == true
487
- end
488
- module ModuleProof2
489
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
490
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
491
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
492
- eigenclass = class << self ; self ; end
493
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
494
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
495
- end
496
- class ClassProof
497
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
498
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
499
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
500
- eigenclass = class << self ; self ; end
501
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
502
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
503
- end
504
- class ClassProof2
505
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
506
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
507
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
508
- eigenclass = class << self ; self ; end
509
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == false
510
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == false
511
- end
512
- Object.new.instance_eval do
513
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09
514
- eigenclass = class << self ; self ; end
515
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module1 ).should == true
516
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock09::Module2 ).should == true
517
- end
518
- end
519
- end
520
-
521
- ################################################
522
- # module_or_instance_extend_prepends_extends #
523
- ################################################
524
-
525
- it 'can extend with another module before this one is used to extend a module or instance' do
526
- module ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
527
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster
528
- module Module1
529
- end
530
- module Module2
531
- end
532
- module_or_instance_extend_prepends_extends( Module1, Module2 ).name = :some_name
533
- respond_to?( :included ).should == true
534
- respond_to?( :extended ).should == true
535
- module ModuleProof
536
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
537
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
538
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
539
- eigenclass = class << self ; self ; end
540
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
541
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
542
- end
543
- module ModuleProof2
544
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
545
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
546
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
547
- eigenclass = class << self ; self ; end
548
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == true
549
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == true
550
- end
551
- class ClassProof
552
- include ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
553
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
554
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
555
- eigenclass = class << self ; self ; end
556
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
557
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
558
- end
559
- class ClassProof2
560
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
561
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
562
- ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
563
- eigenclass = class << self ; self ; end
564
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == false
565
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == false
566
- end
567
- Object.new.instance_eval do
568
- extend ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10
569
- eigenclass = class << self ; self ; end
570
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module1 ).should == true
571
- eigenclass.ancestors.include?( ::ModuleCluster::Define::ModuleOrInstanceCluster::Mock10::Module2 ).should == true
572
- end
573
- end
574
- end
575
-
576
- end