module-cluster 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/README.rdoc +4 -4
- data/lib/module-cluster.rb +19 -10
- data/lib/module-cluster/ModuleCluster.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +29 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +22 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +22 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +32 -5
- data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/Status.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade/Subclass.rb +55 -8
- data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +55 -0
- data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +54 -0
- data/spec/ModuleCluster/Define/Block/Class_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/Instance_spec.rb +12 -12
- data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +53 -0
- data/spec/ModuleCluster/Define/Block/Module_spec.rb +36 -36
- data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +39 -9
- data/spec/ModuleCluster/Define/ClassCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +60 -60
- data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +72 -72
- data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +72 -72
- data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +68 -68
- data/spec/ModuleCluster/Define/Cluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +8 -8
- data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +71 -71
- data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +60 -60
- data/spec/ModuleCluster/Suspend/Hooks_spec.rb +14 -14
- data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +14 -14
- data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +6 -6
- data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +8 -8
- metadata +33 -29
@@ -9,7 +9,7 @@ describe ModuleCluster::Define::Block::Instance do
|
|
9
9
|
|
10
10
|
it 'can run a block on instance extend' do
|
11
11
|
module ModuleCluster::Define::Block::Instance::Mock01
|
12
|
-
extend ModuleCluster::Define::Block::Instance
|
12
|
+
extend ::ModuleCluster::Define::Block::Instance
|
13
13
|
block_ran = false
|
14
14
|
instance_extend do
|
15
15
|
block_ran = true
|
@@ -17,23 +17,23 @@ describe ModuleCluster::Define::Block::Instance do
|
|
17
17
|
end
|
18
18
|
respond_to?( :extended ).should == true
|
19
19
|
module ModuleProof
|
20
|
-
include ModuleCluster::Define::Block::Instance::Mock01
|
20
|
+
include ::ModuleCluster::Define::Block::Instance::Mock01
|
21
21
|
end
|
22
22
|
block_ran.should == false
|
23
23
|
module ModuleProof2
|
24
|
-
extend ModuleCluster::Define::Block::Instance::Mock01
|
24
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock01
|
25
25
|
end
|
26
26
|
block_ran.should == false
|
27
27
|
class ClassProof
|
28
|
-
include ModuleCluster::Define::Block::Instance::Mock01
|
28
|
+
include ::ModuleCluster::Define::Block::Instance::Mock01
|
29
29
|
end
|
30
30
|
block_ran.should == false
|
31
31
|
class ClassProof2
|
32
|
-
extend ModuleCluster::Define::Block::Instance::Mock01
|
32
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock01
|
33
33
|
end
|
34
34
|
block_ran.should == false
|
35
35
|
Object.new.instance_eval do
|
36
|
-
extend ModuleCluster::Define::Block::Instance::Mock01
|
36
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock01
|
37
37
|
end
|
38
38
|
block_ran.should == true
|
39
39
|
end
|
@@ -45,7 +45,7 @@ describe ModuleCluster::Define::Block::Instance do
|
|
45
45
|
|
46
46
|
it 'can run a block before instance extend' do
|
47
47
|
module ModuleCluster::Define::Block::Instance::Mock02
|
48
|
-
extend ModuleCluster::Define::Block::Instance
|
48
|
+
extend ::ModuleCluster::Define::Block::Instance
|
49
49
|
block_ran = false
|
50
50
|
prepend_instance_extend do
|
51
51
|
block_ran = true
|
@@ -53,23 +53,23 @@ describe ModuleCluster::Define::Block::Instance do
|
|
53
53
|
end
|
54
54
|
respond_to?( :extended ).should == true
|
55
55
|
module ModuleProof
|
56
|
-
include ModuleCluster::Define::Block::Instance::Mock02
|
56
|
+
include ::ModuleCluster::Define::Block::Instance::Mock02
|
57
57
|
end
|
58
58
|
block_ran.should == false
|
59
59
|
module ModuleProof2
|
60
|
-
extend ModuleCluster::Define::Block::Instance::Mock02
|
60
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock02
|
61
61
|
end
|
62
62
|
block_ran.should == false
|
63
63
|
class ClassProof
|
64
|
-
include ModuleCluster::Define::Block::Instance::Mock02
|
64
|
+
include ::ModuleCluster::Define::Block::Instance::Mock02
|
65
65
|
end
|
66
66
|
block_ran.should == false
|
67
67
|
class ClassProof2
|
68
|
-
extend ModuleCluster::Define::Block::Instance::Mock02
|
68
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock02
|
69
69
|
end
|
70
70
|
block_ran.should == false
|
71
71
|
Object.new.instance_eval do
|
72
|
-
extend ModuleCluster::Define::Block::Instance::Mock02
|
72
|
+
extend ::ModuleCluster::Define::Block::Instance::Mock02
|
73
73
|
end
|
74
74
|
block_ran.should == true
|
75
75
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
require_relative '../../../../lib/module-cluster.rb'
|
3
|
+
|
4
|
+
describe ModuleCluster::Define::Block::ModuleOrSubclass do
|
5
|
+
|
6
|
+
################################
|
7
|
+
# module_include_or_subclass #
|
8
|
+
################################
|
9
|
+
|
10
|
+
it 'can run a block on class or module extend' do
|
11
|
+
module ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
12
|
+
extend ::ModuleCluster::Define::Block::ModuleOrSubclass
|
13
|
+
block_ran = false
|
14
|
+
module_include_or_subclass do
|
15
|
+
block_ran = true
|
16
|
+
end
|
17
|
+
respond_to?( :extended ).should == true
|
18
|
+
module ModuleProof
|
19
|
+
include ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
20
|
+
end
|
21
|
+
block_ran.should == true
|
22
|
+
block_ran = false
|
23
|
+
module ModuleProof2
|
24
|
+
extend ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
25
|
+
end
|
26
|
+
block_ran.should == false
|
27
|
+
block_ran = false
|
28
|
+
class ClassProof
|
29
|
+
include ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
30
|
+
end
|
31
|
+
block_ran.should == false
|
32
|
+
class ClassProof2
|
33
|
+
extend ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
34
|
+
end
|
35
|
+
block_ran.should == false
|
36
|
+
block_ran = false
|
37
|
+
Object.new.instance_eval do
|
38
|
+
extend ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
39
|
+
end
|
40
|
+
block_ran.should == false
|
41
|
+
class SubClassProof < ClassProof
|
42
|
+
include ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
43
|
+
end
|
44
|
+
block_ran.should == true
|
45
|
+
block_ran = false
|
46
|
+
class SubSubClassProof < SubClassProof
|
47
|
+
include ::ModuleCluster::Define::Block::ModuleOrSubclass::Mock01
|
48
|
+
end
|
49
|
+
block_ran.should == true
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -9,7 +9,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
9
9
|
|
10
10
|
it 'can run a block on module include' do
|
11
11
|
module ModuleCluster::Define::Block::Module::Mock01
|
12
|
-
extend ModuleCluster::Define::Block::Module
|
12
|
+
extend ::ModuleCluster::Define::Block::Module
|
13
13
|
block_ran = false
|
14
14
|
module_include do
|
15
15
|
block_ran = true
|
@@ -17,23 +17,23 @@ describe ModuleCluster::Define::Block::Module do
|
|
17
17
|
end
|
18
18
|
respond_to?( :included ).should == true
|
19
19
|
class ClassProof
|
20
|
-
extend ModuleCluster::Define::Block::Module::Mock01
|
20
|
+
extend ::ModuleCluster::Define::Block::Module::Mock01
|
21
21
|
end
|
22
22
|
block_ran.should == false
|
23
23
|
class ClassProof2
|
24
|
-
include ModuleCluster::Define::Block::Module::Mock01
|
24
|
+
include ::ModuleCluster::Define::Block::Module::Mock01
|
25
25
|
end
|
26
26
|
block_ran.should == false
|
27
27
|
Object.new.instance_eval do
|
28
|
-
extend ModuleCluster::Define::Block::Module::Mock01
|
28
|
+
extend ::ModuleCluster::Define::Block::Module::Mock01
|
29
29
|
end
|
30
30
|
block_ran.should == false
|
31
31
|
module ModuleProof
|
32
|
-
extend ModuleCluster::Define::Block::Module::Mock01
|
32
|
+
extend ::ModuleCluster::Define::Block::Module::Mock01
|
33
33
|
end
|
34
34
|
block_ran.should == false
|
35
35
|
module ModuleProof2
|
36
|
-
include ModuleCluster::Define::Block::Module::Mock01
|
36
|
+
include ::ModuleCluster::Define::Block::Module::Mock01
|
37
37
|
end
|
38
38
|
block_ran.should == true
|
39
39
|
end
|
@@ -45,7 +45,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
45
45
|
|
46
46
|
it 'can run a block on module extend' do
|
47
47
|
module ModuleCluster::Define::Block::Module::Mock02
|
48
|
-
extend ModuleCluster::Define::Block::Module
|
48
|
+
extend ::ModuleCluster::Define::Block::Module
|
49
49
|
block_ran = false
|
50
50
|
module_extend do
|
51
51
|
block_ran = true
|
@@ -53,23 +53,23 @@ describe ModuleCluster::Define::Block::Module do
|
|
53
53
|
end
|
54
54
|
respond_to?( :extended ).should == true
|
55
55
|
class ClassProof
|
56
|
-
include ModuleCluster::Define::Block::Module::Mock02
|
56
|
+
include ::ModuleCluster::Define::Block::Module::Mock02
|
57
57
|
end
|
58
58
|
block_ran.should == false
|
59
59
|
class ClassProof2
|
60
|
-
extend ModuleCluster::Define::Block::Module::Mock02
|
60
|
+
extend ::ModuleCluster::Define::Block::Module::Mock02
|
61
61
|
end
|
62
62
|
block_ran.should == false
|
63
63
|
Object.new.instance_eval do
|
64
|
-
extend ModuleCluster::Define::Block::Module::Mock02
|
64
|
+
extend ::ModuleCluster::Define::Block::Module::Mock02
|
65
65
|
end
|
66
66
|
block_ran.should == false
|
67
67
|
module ModuleProof
|
68
|
-
include ModuleCluster::Define::Block::Module::Mock02
|
68
|
+
include ::ModuleCluster::Define::Block::Module::Mock02
|
69
69
|
end
|
70
70
|
block_ran.should == false
|
71
71
|
module ModuleProof2
|
72
|
-
extend ModuleCluster::Define::Block::Module::Mock02
|
72
|
+
extend ::ModuleCluster::Define::Block::Module::Mock02
|
73
73
|
end
|
74
74
|
block_ran.should == true
|
75
75
|
end
|
@@ -81,7 +81,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
81
81
|
|
82
82
|
it 'can run a block on module include or extend' do
|
83
83
|
module ModuleCluster::Define::Block::Module::Mock03
|
84
|
-
extend ModuleCluster::Define::Block::Module
|
84
|
+
extend ::ModuleCluster::Define::Block::Module
|
85
85
|
block_ran = false
|
86
86
|
module_include_or_extend do
|
87
87
|
block_ran = true
|
@@ -89,24 +89,24 @@ describe ModuleCluster::Define::Block::Module do
|
|
89
89
|
end
|
90
90
|
respond_to?( :extended ).should == true
|
91
91
|
class ClassProof
|
92
|
-
include ModuleCluster::Define::Block::Module::Mock03
|
92
|
+
include ::ModuleCluster::Define::Block::Module::Mock03
|
93
93
|
end
|
94
94
|
block_ran.should == false
|
95
95
|
class ClassProof2
|
96
|
-
extend ModuleCluster::Define::Block::Module::Mock03
|
96
|
+
extend ::ModuleCluster::Define::Block::Module::Mock03
|
97
97
|
end
|
98
98
|
block_ran.should == false
|
99
99
|
Object.new.instance_eval do
|
100
|
-
extend ModuleCluster::Define::Block::Module::Mock03
|
100
|
+
extend ::ModuleCluster::Define::Block::Module::Mock03
|
101
101
|
end
|
102
102
|
block_ran.should == false
|
103
103
|
module ModuleProof
|
104
|
-
include ModuleCluster::Define::Block::Module::Mock03
|
104
|
+
include ::ModuleCluster::Define::Block::Module::Mock03
|
105
105
|
end
|
106
106
|
block_ran.should == true
|
107
107
|
block_ran = false
|
108
108
|
module ModuleProof2
|
109
|
-
extend ModuleCluster::Define::Block::Module::Mock03
|
109
|
+
extend ::ModuleCluster::Define::Block::Module::Mock03
|
110
110
|
end
|
111
111
|
block_ran.should == true
|
112
112
|
end
|
@@ -118,7 +118,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
118
118
|
|
119
119
|
it 'can run a block before module include' do
|
120
120
|
module ModuleCluster::Define::Block::Module::Mock04
|
121
|
-
extend ModuleCluster::Define::Block::Module
|
121
|
+
extend ::ModuleCluster::Define::Block::Module
|
122
122
|
block_ran = false
|
123
123
|
prepend_module_include do
|
124
124
|
block_ran = true
|
@@ -126,23 +126,23 @@ describe ModuleCluster::Define::Block::Module do
|
|
126
126
|
end
|
127
127
|
respond_to?( :included ).should == true
|
128
128
|
class ClassProof
|
129
|
-
extend ModuleCluster::Define::Block::Module::Mock04
|
129
|
+
extend ::ModuleCluster::Define::Block::Module::Mock04
|
130
130
|
end
|
131
131
|
block_ran.should == false
|
132
132
|
class ClassProof2
|
133
|
-
include ModuleCluster::Define::Block::Module::Mock04
|
133
|
+
include ::ModuleCluster::Define::Block::Module::Mock04
|
134
134
|
end
|
135
135
|
block_ran.should == false
|
136
136
|
Object.new.instance_eval do
|
137
|
-
extend ModuleCluster::Define::Block::Module::Mock04
|
137
|
+
extend ::ModuleCluster::Define::Block::Module::Mock04
|
138
138
|
end
|
139
139
|
block_ran.should == false
|
140
140
|
module ModuleProof
|
141
|
-
extend ModuleCluster::Define::Block::Module::Mock04
|
141
|
+
extend ::ModuleCluster::Define::Block::Module::Mock04
|
142
142
|
end
|
143
143
|
block_ran.should == false
|
144
144
|
module ModuleProof2
|
145
|
-
include ModuleCluster::Define::Block::Module::Mock04
|
145
|
+
include ::ModuleCluster::Define::Block::Module::Mock04
|
146
146
|
end
|
147
147
|
block_ran.should == true
|
148
148
|
end
|
@@ -154,7 +154,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
154
154
|
|
155
155
|
it 'can run a block before module extend' do
|
156
156
|
module ModuleCluster::Define::Block::Module::Mock05
|
157
|
-
extend ModuleCluster::Define::Block::Module
|
157
|
+
extend ::ModuleCluster::Define::Block::Module
|
158
158
|
block_ran = false
|
159
159
|
prepend_module_extend do
|
160
160
|
block_ran = true
|
@@ -162,23 +162,23 @@ describe ModuleCluster::Define::Block::Module do
|
|
162
162
|
end
|
163
163
|
respond_to?( :extended ).should == true
|
164
164
|
class ClassProof
|
165
|
-
include ModuleCluster::Define::Block::Module::Mock05
|
165
|
+
include ::ModuleCluster::Define::Block::Module::Mock05
|
166
166
|
end
|
167
167
|
block_ran.should == false
|
168
168
|
class ClassProof2
|
169
|
-
extend ModuleCluster::Define::Block::Module::Mock05
|
169
|
+
extend ::ModuleCluster::Define::Block::Module::Mock05
|
170
170
|
end
|
171
171
|
block_ran.should == false
|
172
172
|
Object.new.instance_eval do
|
173
|
-
extend ModuleCluster::Define::Block::Module::Mock05
|
173
|
+
extend ::ModuleCluster::Define::Block::Module::Mock05
|
174
174
|
end
|
175
175
|
block_ran.should == false
|
176
176
|
module ModuleProof
|
177
|
-
include ModuleCluster::Define::Block::Module::Mock05
|
177
|
+
include ::ModuleCluster::Define::Block::Module::Mock05
|
178
178
|
end
|
179
179
|
block_ran.should == false
|
180
180
|
module ModuleProof2
|
181
|
-
extend ModuleCluster::Define::Block::Module::Mock05
|
181
|
+
extend ::ModuleCluster::Define::Block::Module::Mock05
|
182
182
|
end
|
183
183
|
block_ran.should == true
|
184
184
|
end
|
@@ -190,7 +190,7 @@ describe ModuleCluster::Define::Block::Module do
|
|
190
190
|
|
191
191
|
it 'can run a block before module include or extend' do
|
192
192
|
module ModuleCluster::Define::Block::Module::Mock06
|
193
|
-
extend ModuleCluster::Define::Block::Module
|
193
|
+
extend ::ModuleCluster::Define::Block::Module
|
194
194
|
block_ran = false
|
195
195
|
prepend_module_include_or_extend do
|
196
196
|
block_ran = true
|
@@ -198,24 +198,24 @@ describe ModuleCluster::Define::Block::Module do
|
|
198
198
|
end
|
199
199
|
respond_to?( :extended ).should == true
|
200
200
|
class ClassProof
|
201
|
-
include ModuleCluster::Define::Block::Module::Mock06
|
201
|
+
include ::ModuleCluster::Define::Block::Module::Mock06
|
202
202
|
end
|
203
203
|
block_ran.should == false
|
204
204
|
class ClassProof2
|
205
|
-
extend ModuleCluster::Define::Block::Module::Mock06
|
205
|
+
extend ::ModuleCluster::Define::Block::Module::Mock06
|
206
206
|
end
|
207
207
|
block_ran.should == false
|
208
208
|
Object.new.instance_eval do
|
209
|
-
extend ModuleCluster::Define::Block::Module::Mock06
|
209
|
+
extend ::ModuleCluster::Define::Block::Module::Mock06
|
210
210
|
end
|
211
211
|
block_ran.should == false
|
212
212
|
module ModuleProof
|
213
|
-
include ModuleCluster::Define::Block::Module::Mock06
|
213
|
+
include ::ModuleCluster::Define::Block::Module::Mock06
|
214
214
|
end
|
215
215
|
block_ran.should == true
|
216
216
|
block_ran = false
|
217
217
|
module ModuleProof2
|
218
|
-
extend ModuleCluster::Define::Block::Module::Mock06
|
218
|
+
extend ::ModuleCluster::Define::Block::Module::Mock06
|
219
219
|
end
|
220
220
|
block_ran.should == true
|
221
221
|
end
|
@@ -8,18 +8,12 @@ describe ModuleCluster::Define::Block::Subclass do
|
|
8
8
|
##############
|
9
9
|
|
10
10
|
it 'can run a block when a class is subclassed' do
|
11
|
-
|
12
|
-
# Modules shouldn't work
|
13
|
-
Proc.new do
|
14
|
-
module ModuleCluster::Define::Block::Subclass::ModuleMock01
|
15
|
-
extend ModuleCluster::Define::Block::Subclass
|
16
|
-
end
|
17
|
-
end.should raise_error
|
18
|
-
|
11
|
+
|
19
12
|
class ModuleCluster::Define::Block::Subclass::Mock01
|
20
|
-
extend ModuleCluster::Define::Block::Subclass
|
13
|
+
extend ::ModuleCluster::Define::Block::Subclass
|
21
14
|
block_ran = false
|
22
15
|
subclass do |subclass_instance|
|
16
|
+
subclass_instance.ancestors[ 1 ].should == self
|
23
17
|
self.ancestors.include?( ModuleCluster::Define::Block::Subclass::Mock01 ).should == true
|
24
18
|
subclass_instance.ancestors.include?( ModuleCluster::Define::Block::Subclass::Mock01 ).should == true
|
25
19
|
block_ran = true
|
@@ -38,5 +32,41 @@ describe ModuleCluster::Define::Block::Subclass do
|
|
38
32
|
block_ran.should == true
|
39
33
|
end
|
40
34
|
end
|
35
|
+
|
36
|
+
it 'can run a block when a class is subclassed after a module has defined subclassing' do
|
37
|
+
|
38
|
+
module ModuleCluster::Define::Block::Subclass::Mock02
|
39
|
+
extend ::ModuleCluster::Define::Block::Subclass
|
40
|
+
block_ran = false
|
41
|
+
subclass do |subclass_instance|
|
42
|
+
subclass_instance.ancestors[ 1 ].should == self
|
43
|
+
self.ancestors.include?( ModuleCluster::Define::Block::Subclass::Mock02 ).should == true
|
44
|
+
subclass_instance.ancestors.include?( ModuleCluster::Define::Block::Subclass::Mock02 ).should == true
|
45
|
+
block_ran = true
|
46
|
+
end
|
47
|
+
respond_to?( :included ).should == true
|
48
|
+
respond_to?( :extended ).should == true
|
49
|
+
respond_to?( :append_features ).should == false
|
50
|
+
respond_to?( :extend_object ).should == false
|
51
|
+
class ClassProof
|
52
|
+
include ::ModuleCluster::Define::Block::Subclass::Mock02
|
53
|
+
respond_to?( :inherited ).should == true
|
54
|
+
respond_to?( :included ).should == false
|
55
|
+
respond_to?( :extended ).should == false
|
56
|
+
respond_to?( :append_features ).should == false
|
57
|
+
respond_to?( :extend_object ).should == false
|
58
|
+
end
|
59
|
+
block_ran.should == false
|
60
|
+
block_ran = false
|
61
|
+
class ClassProof2 < ClassProof
|
62
|
+
end
|
63
|
+
block_ran.should == true
|
64
|
+
block_ran = false
|
65
|
+
class ClassProof3 < ClassProof2
|
66
|
+
end
|
67
|
+
block_ran.should == true
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
41
71
|
|
42
72
|
end
|
@@ -29,7 +29,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
29
29
|
|
30
30
|
it 'can include other modules when this one is included in a class' do
|
31
31
|
module ModuleCluster::Define::ClassCluster::Mock01
|
32
|
-
extend ModuleCluster::Define::ClassCluster
|
32
|
+
extend ::ModuleCluster::Define::ClassCluster
|
33
33
|
module Module1
|
34
34
|
end
|
35
35
|
module Module2
|
@@ -37,7 +37,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
37
37
|
class_include_also_includes( Module1, Module2 ).name = :some_name
|
38
38
|
respond_to?( :included ).should == true
|
39
39
|
module ModuleProof
|
40
|
-
include ModuleCluster::Define::ClassCluster::Mock01
|
40
|
+
include ::ModuleCluster::Define::ClassCluster::Mock01
|
41
41
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock01::Module1 ).should == false
|
42
42
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock01::Module2 ).should == false
|
43
43
|
eigenclass = class << self ; self ; end
|
@@ -45,7 +45,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
45
45
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock01::Module2 ).should == false
|
46
46
|
end
|
47
47
|
class ClassProof
|
48
|
-
include ModuleCluster::Define::ClassCluster::Mock01
|
48
|
+
include ::ModuleCluster::Define::ClassCluster::Mock01
|
49
49
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock01::Module1 ).should == true
|
50
50
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock01::Module2 ).should == true
|
51
51
|
eigenclass = class << self ; self ; end
|
@@ -61,7 +61,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
61
61
|
|
62
62
|
it 'can extend other modules when this one is included in a class' do
|
63
63
|
module ModuleCluster::Define::ClassCluster::Mock02
|
64
|
-
extend ModuleCluster::Define::ClassCluster
|
64
|
+
extend ::ModuleCluster::Define::ClassCluster
|
65
65
|
module Module1
|
66
66
|
end
|
67
67
|
module Module2
|
@@ -69,7 +69,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
69
69
|
class_include_also_extends( Module1, Module2 ).name = :some_name
|
70
70
|
respond_to?( :included ).should == true
|
71
71
|
module ModuleProof
|
72
|
-
include ModuleCluster::Define::ClassCluster::Mock02
|
72
|
+
include ::ModuleCluster::Define::ClassCluster::Mock02
|
73
73
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock02::Module1 ).should == false
|
74
74
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock02::Module2 ).should == false
|
75
75
|
eigenclass = class << self ; self ; end
|
@@ -77,7 +77,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
77
77
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock02::Module2 ).should == false
|
78
78
|
end
|
79
79
|
class ClassProof
|
80
|
-
include ModuleCluster::Define::ClassCluster::Mock02
|
80
|
+
include ::ModuleCluster::Define::ClassCluster::Mock02
|
81
81
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock02::Module1 ).should == false
|
82
82
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock02::Module2 ).should == false
|
83
83
|
eigenclass = class << self ; self ; end
|
@@ -93,7 +93,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
93
93
|
|
94
94
|
it 'can include and extend other modules when this one is included in a class' do
|
95
95
|
module ModuleCluster::Define::ClassCluster::Mock03
|
96
|
-
extend ModuleCluster::Define::ClassCluster
|
96
|
+
extend ::ModuleCluster::Define::ClassCluster
|
97
97
|
module Module1
|
98
98
|
end
|
99
99
|
module Module2
|
@@ -101,7 +101,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
101
101
|
class_include_also_includes_and_extends( Module1, Module2 ).name = :some_name
|
102
102
|
respond_to?( :included ).should == true
|
103
103
|
module ModuleProof
|
104
|
-
include ModuleCluster::Define::ClassCluster::Mock03
|
104
|
+
include ::ModuleCluster::Define::ClassCluster::Mock03
|
105
105
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock03::Module1 ).should == false
|
106
106
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock03::Module2 ).should == false
|
107
107
|
eigenclass = class << self ; self ; end
|
@@ -109,7 +109,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
109
109
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock03::Module2 ).should == false
|
110
110
|
end
|
111
111
|
class ClassProof
|
112
|
-
include ModuleCluster::Define::ClassCluster::Mock03
|
112
|
+
include ::ModuleCluster::Define::ClassCluster::Mock03
|
113
113
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock03::Module1 ).should == true
|
114
114
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock03::Module2 ).should == true
|
115
115
|
eigenclass = class << self ; self ; end
|
@@ -125,7 +125,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
125
125
|
|
126
126
|
it 'can include other modules when this one extends a class' do
|
127
127
|
module ModuleCluster::Define::ClassCluster::Mock04
|
128
|
-
extend ModuleCluster::Define::ClassCluster
|
128
|
+
extend ::ModuleCluster::Define::ClassCluster
|
129
129
|
module Module1
|
130
130
|
end
|
131
131
|
module Module2
|
@@ -133,7 +133,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
133
133
|
class_extend_also_includes( Module1, Module2 ).name = :some_name
|
134
134
|
respond_to?( :extended ).should == true
|
135
135
|
module ModuleProof
|
136
|
-
extend ModuleCluster::Define::ClassCluster::Mock04
|
136
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock04
|
137
137
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock04::Module1 ).should == false
|
138
138
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock04::Module2 ).should == false
|
139
139
|
eigenclass = class << self ; self ; end
|
@@ -141,7 +141,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
141
141
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock04::Module2 ).should == false
|
142
142
|
end
|
143
143
|
class ClassProof
|
144
|
-
extend ModuleCluster::Define::ClassCluster::Mock04
|
144
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock04
|
145
145
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock04::Module1 ).should == true
|
146
146
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock04::Module2 ).should == true
|
147
147
|
eigenclass = class << self ; self ; end
|
@@ -157,7 +157,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
157
157
|
|
158
158
|
it 'can extend other modules when this one extends a class' do
|
159
159
|
module ModuleCluster::Define::ClassCluster::Mock05
|
160
|
-
extend ModuleCluster::Define::ClassCluster
|
160
|
+
extend ::ModuleCluster::Define::ClassCluster
|
161
161
|
module Module1
|
162
162
|
end
|
163
163
|
module Module2
|
@@ -165,7 +165,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
165
165
|
class_extend_also_extends( Module1, Module2 ).name = :some_name
|
166
166
|
respond_to?( :extended ).should == true
|
167
167
|
module ModuleProof
|
168
|
-
extend ModuleCluster::Define::ClassCluster::Mock05
|
168
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock05
|
169
169
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module1 ).should == false
|
170
170
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module2 ).should == false
|
171
171
|
eigenclass = class << self ; self ; end
|
@@ -173,7 +173,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
173
173
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module2 ).should == false
|
174
174
|
end
|
175
175
|
class ClassProof
|
176
|
-
extend ModuleCluster::Define::ClassCluster::Mock05
|
176
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock05
|
177
177
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module1 ).should == false
|
178
178
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module2 ).should == false
|
179
179
|
eigenclass = class << self ; self ; end
|
@@ -181,7 +181,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
181
181
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module2 ).should == true
|
182
182
|
end
|
183
183
|
Object.new.instance_eval do
|
184
|
-
extend ModuleCluster::Define::ClassCluster::Mock05
|
184
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock05
|
185
185
|
eigenclass = class << self ; self ; end
|
186
186
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module1 ).should == false
|
187
187
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock05::Module2 ).should == false
|
@@ -195,7 +195,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
195
195
|
|
196
196
|
it 'can include and extend other modules when this one extends a class' do
|
197
197
|
module ModuleCluster::Define::ClassCluster::Mock06
|
198
|
-
extend ModuleCluster::Define::ClassCluster
|
198
|
+
extend ::ModuleCluster::Define::ClassCluster
|
199
199
|
module Module1
|
200
200
|
end
|
201
201
|
module Module2
|
@@ -203,7 +203,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
203
203
|
class_extend_also_includes_and_extends( Module1, Module2 ).name = :some_name
|
204
204
|
respond_to?( :extended ).should == true
|
205
205
|
module ModuleProof
|
206
|
-
extend ModuleCluster::Define::ClassCluster::Mock06
|
206
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock06
|
207
207
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module1 ).should == false
|
208
208
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module2 ).should == false
|
209
209
|
eigenclass = class << self ; self ; end
|
@@ -211,7 +211,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
211
211
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module2 ).should == false
|
212
212
|
end
|
213
213
|
class ClassProof
|
214
|
-
extend ModuleCluster::Define::ClassCluster::Mock06
|
214
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock06
|
215
215
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module1 ).should == true
|
216
216
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module2 ).should == true
|
217
217
|
eigenclass = class << self ; self ; end
|
@@ -219,7 +219,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
219
219
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module2 ).should == true
|
220
220
|
end
|
221
221
|
Object.new.instance_eval do
|
222
|
-
extend ModuleCluster::Define::ClassCluster::Mock06
|
222
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock06
|
223
223
|
eigenclass = class << self ; self ; end
|
224
224
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module1 ).should == false
|
225
225
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock06::Module2 ).should == false
|
@@ -233,7 +233,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
233
233
|
|
234
234
|
it 'can include other modules before this one when this one is included in a class' do
|
235
235
|
module ModuleCluster::Define::ClassCluster::Mock07
|
236
|
-
extend ModuleCluster::Define::ClassCluster
|
236
|
+
extend ::ModuleCluster::Define::ClassCluster
|
237
237
|
module Module1
|
238
238
|
end
|
239
239
|
module Module2
|
@@ -241,7 +241,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
241
241
|
class_include_prepends_includes( Module1, Module2 ).name = :some_name
|
242
242
|
respond_to?( :append_features ).should == true
|
243
243
|
module ModuleProof
|
244
|
-
include ModuleCluster::Define::ClassCluster::Mock07
|
244
|
+
include ::ModuleCluster::Define::ClassCluster::Mock07
|
245
245
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock07::Module1 ).should == false
|
246
246
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock07::Module2 ).should == false
|
247
247
|
eigenclass = class << self ; self ; end
|
@@ -249,7 +249,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
249
249
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock07::Module2 ).should == false
|
250
250
|
end
|
251
251
|
class ClassProof
|
252
|
-
include ModuleCluster::Define::ClassCluster::Mock07
|
252
|
+
include ::ModuleCluster::Define::ClassCluster::Mock07
|
253
253
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock07::Module1 ).should == true
|
254
254
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock07::Module2 ).should == true
|
255
255
|
eigenclass = class << self ; self ; end
|
@@ -265,7 +265,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
265
265
|
|
266
266
|
it 'can extend other modules before this one when this one is included in a class' do
|
267
267
|
module ModuleCluster::Define::ClassCluster::Mock08
|
268
|
-
extend ModuleCluster::Define::ClassCluster
|
268
|
+
extend ::ModuleCluster::Define::ClassCluster
|
269
269
|
module Module1
|
270
270
|
end
|
271
271
|
module Module2
|
@@ -273,7 +273,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
273
273
|
class_include_prepends_extends( Module1, Module2 ).name = :some_name
|
274
274
|
respond_to?( :append_features ).should == true
|
275
275
|
module ModuleProof
|
276
|
-
include ModuleCluster::Define::ClassCluster::Mock08
|
276
|
+
include ::ModuleCluster::Define::ClassCluster::Mock08
|
277
277
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock08::Module1 ).should == false
|
278
278
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock08::Module2 ).should == false
|
279
279
|
eigenclass = class << self ; self ; end
|
@@ -281,7 +281,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
281
281
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock08::Module2 ).should == false
|
282
282
|
end
|
283
283
|
class ClassProof
|
284
|
-
include ModuleCluster::Define::ClassCluster::Mock08
|
284
|
+
include ::ModuleCluster::Define::ClassCluster::Mock08
|
285
285
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock08::Module1 ).should == false
|
286
286
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock08::Module2 ).should == false
|
287
287
|
eigenclass = class << self ; self ; end
|
@@ -297,7 +297,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
297
297
|
|
298
298
|
it 'can include and extend other modules before this one when this one is included in a class' do
|
299
299
|
module ModuleCluster::Define::ClassCluster::Mock09
|
300
|
-
extend ModuleCluster::Define::ClassCluster
|
300
|
+
extend ::ModuleCluster::Define::ClassCluster
|
301
301
|
module Module1
|
302
302
|
end
|
303
303
|
module Module2
|
@@ -305,7 +305,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
305
305
|
class_include_prepends_includes_and_extends( Module1, Module2 ).name = :some_name
|
306
306
|
respond_to?( :append_features ).should == true
|
307
307
|
module ModuleProof
|
308
|
-
include ModuleCluster::Define::ClassCluster::Mock09
|
308
|
+
include ::ModuleCluster::Define::ClassCluster::Mock09
|
309
309
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock09::Module1 ).should == false
|
310
310
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock09::Module2 ).should == false
|
311
311
|
eigenclass = class << self ; self ; end
|
@@ -313,7 +313,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
313
313
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock09::Module2 ).should == false
|
314
314
|
end
|
315
315
|
class ClassProof
|
316
|
-
include ModuleCluster::Define::ClassCluster::Mock09
|
316
|
+
include ::ModuleCluster::Define::ClassCluster::Mock09
|
317
317
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock09::Module1 ).should == true
|
318
318
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock09::Module2 ).should == true
|
319
319
|
eigenclass = class << self ; self ; end
|
@@ -329,7 +329,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
329
329
|
|
330
330
|
it 'can include other modules before this one when this one extends a class' do
|
331
331
|
module ModuleCluster::Define::ClassCluster::Mock10
|
332
|
-
extend ModuleCluster::Define::ClassCluster
|
332
|
+
extend ::ModuleCluster::Define::ClassCluster
|
333
333
|
module Module1
|
334
334
|
end
|
335
335
|
module Module2
|
@@ -337,7 +337,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
337
337
|
class_extend_prepends_includes( Module1, Module2 ).name = :some_name
|
338
338
|
respond_to?( :extend_object ).should == true
|
339
339
|
module ModuleProof
|
340
|
-
extend ModuleCluster::Define::ClassCluster::Mock10
|
340
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock10
|
341
341
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock10::Module1 ).should == false
|
342
342
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock10::Module2 ).should == false
|
343
343
|
eigenclass = class << self ; self ; end
|
@@ -345,7 +345,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
345
345
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock10::Module2 ).should == false
|
346
346
|
end
|
347
347
|
class ClassProof
|
348
|
-
extend ModuleCluster::Define::ClassCluster::Mock10
|
348
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock10
|
349
349
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock10::Module1 ).should == true
|
350
350
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock10::Module2 ).should == true
|
351
351
|
eigenclass = class << self ; self ; end
|
@@ -361,7 +361,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
361
361
|
|
362
362
|
it 'can extend other modules before this one when this one extends a class' do
|
363
363
|
module ModuleCluster::Define::ClassCluster::Mock11
|
364
|
-
extend ModuleCluster::Define::ClassCluster
|
364
|
+
extend ::ModuleCluster::Define::ClassCluster
|
365
365
|
module Module1
|
366
366
|
end
|
367
367
|
module Module2
|
@@ -369,7 +369,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
369
369
|
class_extend_prepends_extends( Module1, Module2 ).name = :some_name
|
370
370
|
respond_to?( :extend_object ).should == true
|
371
371
|
module ModuleProof
|
372
|
-
extend ModuleCluster::Define::ClassCluster::Mock11
|
372
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock11
|
373
373
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module1 ).should == false
|
374
374
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module2 ).should == false
|
375
375
|
eigenclass = class << self ; self ; end
|
@@ -377,7 +377,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
377
377
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module2 ).should == false
|
378
378
|
end
|
379
379
|
class ClassProof
|
380
|
-
extend ModuleCluster::Define::ClassCluster::Mock11
|
380
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock11
|
381
381
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module1 ).should == false
|
382
382
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module2 ).should == false
|
383
383
|
eigenclass = class << self ; self ; end
|
@@ -385,7 +385,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
385
385
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module2 ).should == true
|
386
386
|
end
|
387
387
|
Object.new.instance_eval do
|
388
|
-
extend ModuleCluster::Define::ClassCluster::Mock11
|
388
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock11
|
389
389
|
eigenclass = class << self ; self ; end
|
390
390
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module1 ).should == false
|
391
391
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock11::Module2 ).should == false
|
@@ -399,7 +399,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
399
399
|
|
400
400
|
it 'can include and extend other modules before this one when this one extends a class' do
|
401
401
|
module ModuleCluster::Define::ClassCluster::Mock12
|
402
|
-
extend ModuleCluster::Define::ClassCluster
|
402
|
+
extend ::ModuleCluster::Define::ClassCluster
|
403
403
|
module Module1
|
404
404
|
end
|
405
405
|
module Module2
|
@@ -407,7 +407,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
407
407
|
class_extend_prepends_includes_and_extends( Module1, Module2 ).name = :some_name
|
408
408
|
respond_to?( :extend_object ).should == true
|
409
409
|
module ModuleProof
|
410
|
-
extend ModuleCluster::Define::ClassCluster::Mock12
|
410
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock12
|
411
411
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module1 ).should == false
|
412
412
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module2 ).should == false
|
413
413
|
eigenclass = class << self ; self ; end
|
@@ -415,7 +415,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
415
415
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module2 ).should == false
|
416
416
|
end
|
417
417
|
class ClassProof
|
418
|
-
extend ModuleCluster::Define::ClassCluster::Mock12
|
418
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock12
|
419
419
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module1 ).should == true
|
420
420
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module2 ).should == true
|
421
421
|
eigenclass = class << self ; self ; end
|
@@ -423,7 +423,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
423
423
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module2 ).should == true
|
424
424
|
end
|
425
425
|
Object.new.instance_eval do
|
426
|
-
extend ModuleCluster::Define::ClassCluster::Mock12
|
426
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock12
|
427
427
|
eigenclass = class << self ; self ; end
|
428
428
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module1 ).should == false
|
429
429
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock12::Module2 ).should == false
|
@@ -437,7 +437,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
437
437
|
|
438
438
|
it 'can include other modules when this one is included in or extends a class' do
|
439
439
|
module ModuleCluster::Define::ClassCluster::Mock13
|
440
|
-
extend ModuleCluster::Define::ClassCluster
|
440
|
+
extend ::ModuleCluster::Define::ClassCluster
|
441
441
|
module Module1
|
442
442
|
end
|
443
443
|
module Module2
|
@@ -445,7 +445,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
445
445
|
class_include_or_extend_also_includes( Module1, Module2 ).name = :some_name
|
446
446
|
respond_to?( :append_features ).should == true
|
447
447
|
module ModuleProof
|
448
|
-
include ModuleCluster::Define::ClassCluster::Mock13
|
448
|
+
include ::ModuleCluster::Define::ClassCluster::Mock13
|
449
449
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module1 ).should == false
|
450
450
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == false
|
451
451
|
eigenclass = class << self ; self ; end
|
@@ -453,7 +453,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
453
453
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == false
|
454
454
|
end
|
455
455
|
module ModuleProof2
|
456
|
-
extend ModuleCluster::Define::ClassCluster::Mock13
|
456
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock13
|
457
457
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module1 ).should == false
|
458
458
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == false
|
459
459
|
eigenclass = class << self ; self ; end
|
@@ -461,7 +461,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
461
461
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == false
|
462
462
|
end
|
463
463
|
class ClassProof
|
464
|
-
include ModuleCluster::Define::ClassCluster::Mock13
|
464
|
+
include ::ModuleCluster::Define::ClassCluster::Mock13
|
465
465
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module1 ).should == true
|
466
466
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == true
|
467
467
|
eigenclass = class << self ; self ; end
|
@@ -469,7 +469,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
469
469
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == false
|
470
470
|
end
|
471
471
|
class ClassProof2
|
472
|
-
include ModuleCluster::Define::ClassCluster::Mock13
|
472
|
+
include ::ModuleCluster::Define::ClassCluster::Mock13
|
473
473
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module1 ).should == true
|
474
474
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock13::Module2 ).should == true
|
475
475
|
eigenclass = class << self ; self ; end
|
@@ -485,7 +485,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
485
485
|
|
486
486
|
it 'can extend other modules when this one is included in or extends a class' do
|
487
487
|
module ModuleCluster::Define::ClassCluster::Mock14
|
488
|
-
extend ModuleCluster::Define::ClassCluster
|
488
|
+
extend ::ModuleCluster::Define::ClassCluster
|
489
489
|
module Module1
|
490
490
|
end
|
491
491
|
module Module2
|
@@ -493,7 +493,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
493
493
|
class_include_or_extend_also_extends( Module1, Module2 ).name = :some_name
|
494
494
|
respond_to?( :included ).should == true
|
495
495
|
module ModuleProof
|
496
|
-
include ModuleCluster::Define::ClassCluster::Mock14
|
496
|
+
include ::ModuleCluster::Define::ClassCluster::Mock14
|
497
497
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module1 ).should == false
|
498
498
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
499
499
|
eigenclass = class << self ; self ; end
|
@@ -501,7 +501,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
501
501
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
502
502
|
end
|
503
503
|
module ModuleProof2
|
504
|
-
extend ModuleCluster::Define::ClassCluster::Mock14
|
504
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock14
|
505
505
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module1 ).should == false
|
506
506
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
507
507
|
eigenclass = class << self ; self ; end
|
@@ -509,7 +509,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
509
509
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
510
510
|
end
|
511
511
|
class ClassProof
|
512
|
-
include ModuleCluster::Define::ClassCluster::Mock14
|
512
|
+
include ::ModuleCluster::Define::ClassCluster::Mock14
|
513
513
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module1 ).should == false
|
514
514
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
515
515
|
eigenclass = class << self ; self ; end
|
@@ -517,7 +517,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
517
517
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == true
|
518
518
|
end
|
519
519
|
class ClassProof2
|
520
|
-
extend ModuleCluster::Define::ClassCluster::Mock14
|
520
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock14
|
521
521
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module1 ).should == false
|
522
522
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock14::Module2 ).should == false
|
523
523
|
eigenclass = class << self ; self ; end
|
@@ -533,7 +533,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
533
533
|
|
534
534
|
it 'can include and extend other modules when this one is included in or extends a class' do
|
535
535
|
module ModuleCluster::Define::ClassCluster::Mock15
|
536
|
-
extend ModuleCluster::Define::ClassCluster
|
536
|
+
extend ::ModuleCluster::Define::ClassCluster
|
537
537
|
module Module1
|
538
538
|
end
|
539
539
|
module Module2
|
@@ -541,7 +541,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
541
541
|
class_include_or_extend_also_includes_and_extends( Module1, Module2 ).name = :some_name
|
542
542
|
respond_to?( :included ).should == true
|
543
543
|
module ModuleProof
|
544
|
-
include ModuleCluster::Define::ClassCluster::Mock15
|
544
|
+
include ::ModuleCluster::Define::ClassCluster::Mock15
|
545
545
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module1 ).should == false
|
546
546
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == false
|
547
547
|
eigenclass = class << self ; self ; end
|
@@ -549,7 +549,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
549
549
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == false
|
550
550
|
end
|
551
551
|
module ModuleProo2
|
552
|
-
extend ModuleCluster::Define::ClassCluster::Mock15
|
552
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock15
|
553
553
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module1 ).should == false
|
554
554
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == false
|
555
555
|
eigenclass = class << self ; self ; end
|
@@ -557,7 +557,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
557
557
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == false
|
558
558
|
end
|
559
559
|
class ClassProof
|
560
|
-
include ModuleCluster::Define::ClassCluster::Mock15
|
560
|
+
include ::ModuleCluster::Define::ClassCluster::Mock15
|
561
561
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module1 ).should == true
|
562
562
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == true
|
563
563
|
eigenclass = class << self ; self ; end
|
@@ -565,7 +565,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
565
565
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == true
|
566
566
|
end
|
567
567
|
class ClassProof2
|
568
|
-
extend ModuleCluster::Define::ClassCluster::Mock15
|
568
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock15
|
569
569
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module1 ).should == true
|
570
570
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock15::Module2 ).should == true
|
571
571
|
eigenclass = class << self ; self ; end
|
@@ -581,7 +581,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
581
581
|
|
582
582
|
it 'can include other modules before this one when this one is included in or extends a class' do
|
583
583
|
module ModuleCluster::Define::ClassCluster::Mock16
|
584
|
-
extend ModuleCluster::Define::ClassCluster
|
584
|
+
extend ::ModuleCluster::Define::ClassCluster
|
585
585
|
module Module1
|
586
586
|
end
|
587
587
|
module Module2
|
@@ -589,7 +589,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
589
589
|
class_include_or_extend_prepends_includes( Module1, Module2 ).name = :some_name
|
590
590
|
respond_to?( :append_features ).should == true
|
591
591
|
module ModuleProof
|
592
|
-
include ModuleCluster::Define::ClassCluster::Mock16
|
592
|
+
include ::ModuleCluster::Define::ClassCluster::Mock16
|
593
593
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module1 ).should == false
|
594
594
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == false
|
595
595
|
eigenclass = class << self ; self ; end
|
@@ -597,7 +597,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
597
597
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == false
|
598
598
|
end
|
599
599
|
module ModuleProof2
|
600
|
-
extend ModuleCluster::Define::ClassCluster::Mock16
|
600
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock16
|
601
601
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module1 ).should == false
|
602
602
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == false
|
603
603
|
eigenclass = class << self ; self ; end
|
@@ -605,7 +605,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
605
605
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == false
|
606
606
|
end
|
607
607
|
class ClassProof
|
608
|
-
include ModuleCluster::Define::ClassCluster::Mock16
|
608
|
+
include ::ModuleCluster::Define::ClassCluster::Mock16
|
609
609
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module1 ).should == true
|
610
610
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == true
|
611
611
|
eigenclass = class << self ; self ; end
|
@@ -613,7 +613,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
613
613
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == false
|
614
614
|
end
|
615
615
|
class ClassProof2
|
616
|
-
extend ModuleCluster::Define::ClassCluster::Mock16
|
616
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock16
|
617
617
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module1 ).should == true
|
618
618
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock16::Module2 ).should == true
|
619
619
|
eigenclass = class << self ; self ; end
|
@@ -629,7 +629,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
629
629
|
|
630
630
|
it 'can extend other modules before this one when this one is included in or extends a class' do
|
631
631
|
module ModuleCluster::Define::ClassCluster::Mock17
|
632
|
-
extend ModuleCluster::Define::ClassCluster
|
632
|
+
extend ::ModuleCluster::Define::ClassCluster
|
633
633
|
module Module1
|
634
634
|
end
|
635
635
|
module Module2
|
@@ -637,7 +637,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
637
637
|
class_include_or_extend_prepends_extends( Module1, Module2 ).name = :some_name
|
638
638
|
respond_to?( :extend_object ).should == true
|
639
639
|
module ModuleProof
|
640
|
-
include ModuleCluster::Define::ClassCluster::Mock17
|
640
|
+
include ::ModuleCluster::Define::ClassCluster::Mock17
|
641
641
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module1 ).should == false
|
642
642
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
643
643
|
eigenclass = class << self ; self ; end
|
@@ -645,7 +645,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
645
645
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
646
646
|
end
|
647
647
|
module ModuleProof2
|
648
|
-
extend ModuleCluster::Define::ClassCluster::Mock17
|
648
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock17
|
649
649
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module1 ).should == false
|
650
650
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
651
651
|
eigenclass = class << self ; self ; end
|
@@ -653,7 +653,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
653
653
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
654
654
|
end
|
655
655
|
class ClassProof
|
656
|
-
include ModuleCluster::Define::ClassCluster::Mock17
|
656
|
+
include ::ModuleCluster::Define::ClassCluster::Mock17
|
657
657
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module1 ).should == false
|
658
658
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
659
659
|
eigenclass = class << self ; self ; end
|
@@ -661,7 +661,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
661
661
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == true
|
662
662
|
end
|
663
663
|
class ClassProof2
|
664
|
-
extend ModuleCluster::Define::ClassCluster::Mock17
|
664
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock17
|
665
665
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module1 ).should == false
|
666
666
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
667
667
|
eigenclass = class << self ; self ; end
|
@@ -669,7 +669,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
669
669
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == true
|
670
670
|
end
|
671
671
|
Object.new.instance_eval do
|
672
|
-
extend ModuleCluster::Define::ClassCluster::Mock17
|
672
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock17
|
673
673
|
eigenclass = class << self ; self ; end
|
674
674
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module1 ).should == false
|
675
675
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock17::Module2 ).should == false
|
@@ -683,7 +683,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
683
683
|
|
684
684
|
it 'can include and extend other modules before this one when this one is included in or extends a class' do
|
685
685
|
module ModuleCluster::Define::ClassCluster::Mock18
|
686
|
-
extend ModuleCluster::Define::ClassCluster
|
686
|
+
extend ::ModuleCluster::Define::ClassCluster
|
687
687
|
module Module1
|
688
688
|
end
|
689
689
|
module Module2
|
@@ -691,7 +691,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
691
691
|
class_include_or_extend_prepends_includes_and_extends( Module1, Module2 ).name = :some_name
|
692
692
|
respond_to?( :append_features ).should == true
|
693
693
|
module ModuleProof
|
694
|
-
include ModuleCluster::Define::ClassCluster::Mock18
|
694
|
+
include ::ModuleCluster::Define::ClassCluster::Mock18
|
695
695
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module1 ).should == false
|
696
696
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == false
|
697
697
|
eigenclass = class << self ; self ; end
|
@@ -699,7 +699,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
699
699
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == false
|
700
700
|
end
|
701
701
|
module ModuleProof2
|
702
|
-
extend ModuleCluster::Define::ClassCluster::Mock18
|
702
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock18
|
703
703
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module1 ).should == false
|
704
704
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == false
|
705
705
|
eigenclass = class << self ; self ; end
|
@@ -707,7 +707,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
707
707
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == false
|
708
708
|
end
|
709
709
|
class ClassProof
|
710
|
-
include ModuleCluster::Define::ClassCluster::Mock18
|
710
|
+
include ::ModuleCluster::Define::ClassCluster::Mock18
|
711
711
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module1 ).should == true
|
712
712
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == true
|
713
713
|
eigenclass = class << self ; self ; end
|
@@ -715,7 +715,7 @@ describe ModuleCluster::Define::ClassCluster do
|
|
715
715
|
eigenclass.ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == true
|
716
716
|
end
|
717
717
|
class ClassProof2
|
718
|
-
extend ModuleCluster::Define::ClassCluster::Mock18
|
718
|
+
extend ::ModuleCluster::Define::ClassCluster::Mock18
|
719
719
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module1 ).should == true
|
720
720
|
ancestors.include?( ModuleCluster::Define::ClassCluster::Mock18::Module2 ).should == true
|
721
721
|
eigenclass = class << self ; self ; end
|