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.
Files changed (55) hide show
  1. data/README.md +4 -4
  2. data/README.rdoc +4 -4
  3. data/lib/module-cluster.rb +19 -10
  4. data/lib/module-cluster/ModuleCluster.rb +1 -1
  5. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +3 -3
  6. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +4 -4
  7. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +4 -4
  8. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +4 -4
  9. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +29 -0
  10. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +22 -0
  11. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +3 -3
  12. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +3 -3
  13. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +4 -4
  14. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +22 -0
  15. data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +32 -5
  16. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +3 -3
  17. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +3 -3
  18. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +3 -3
  19. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +3 -3
  20. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +3 -3
  21. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +3 -3
  22. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -3
  23. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +3 -3
  24. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +3 -3
  25. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +3 -3
  26. data/lib/module-cluster/ModuleCluster/Define/Status.rb +4 -4
  27. data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +1 -1
  28. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +1 -1
  29. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +1 -1
  30. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade/Subclass.rb +55 -8
  31. data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +36 -36
  32. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +36 -36
  33. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +55 -0
  34. data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +36 -36
  35. data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +54 -0
  36. data/spec/ModuleCluster/Define/Block/Class_spec.rb +36 -36
  37. data/spec/ModuleCluster/Define/Block/Instance_spec.rb +12 -12
  38. data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +53 -0
  39. data/spec/ModuleCluster/Define/Block/Module_spec.rb +36 -36
  40. data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +39 -9
  41. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +71 -71
  42. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +60 -60
  43. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +72 -72
  44. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +72 -72
  45. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +68 -68
  46. data/spec/ModuleCluster/Define/Cluster_spec.rb +71 -71
  47. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +8 -8
  48. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +71 -71
  49. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +71 -71
  50. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +60 -60
  51. data/spec/ModuleCluster/Suspend/Hooks_spec.rb +14 -14
  52. data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +14 -14
  53. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +6 -6
  54. data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +8 -8
  55. metadata +33 -29
@@ -0,0 +1,55 @@
1
+
2
+ require_relative '../../../../lib/module-cluster.rb'
3
+
4
+ describe ModuleCluster::Define::Block::ClassOrModuleOrSubclass do
5
+
6
+ ########################################
7
+ # class_or_module_or_instance_extend #
8
+ ########################################
9
+
10
+ it 'can run a block on class or module extend' do
11
+ module ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
12
+ extend ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass
13
+ block_ran = false
14
+ class_or_module_include_or_subclass do
15
+ block_ran = true
16
+ self.should == ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
17
+ end
18
+ respond_to?( :extended ).should == true
19
+ module ModuleProof
20
+ include ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
21
+ end
22
+ block_ran.should == true
23
+ block_ran = false
24
+ module ModuleProof2
25
+ extend ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
26
+ end
27
+ block_ran.should == false
28
+ block_ran = false
29
+ class ClassProof
30
+ include ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
31
+ end
32
+ block_ran.should == true
33
+ block_ran = false
34
+ class ClassProof2
35
+ extend ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
36
+ end
37
+ block_ran.should == false
38
+ block_ran = false
39
+ Object.new.instance_eval do
40
+ extend ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
41
+ end
42
+ block_ran.should == false
43
+ class SubClassProof < ClassProof
44
+ include ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
45
+ end
46
+ block_ran.should == true
47
+ block_ran = false
48
+ class SubSubClassProof < SubClassProof
49
+ include ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass::Mock01
50
+ end
51
+ block_ran.should == true
52
+ end
53
+ end
54
+
55
+ end
@@ -9,7 +9,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
9
9
 
10
10
  it 'can run a block on class or module include' do
11
11
  module ModuleCluster::Define::Block::ClassOrModule::Mock01
12
- extend ModuleCluster::Define::Block::ClassOrModule
12
+ extend ::ModuleCluster::Define::Block::ClassOrModule
13
13
  block_ran = false
14
14
  class_or_module_include do
15
15
  block_ran = true
@@ -17,24 +17,24 @@ describe ModuleCluster::Define::Block::ClassOrModule do
17
17
  end
18
18
  respond_to?( :included ).should == true
19
19
  class ClassProof
20
- extend ModuleCluster::Define::Block::ClassOrModule::Mock01
20
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock01
21
21
  end
22
22
  block_ran.should == false
23
23
  class ClassProof2
24
- include ModuleCluster::Define::Block::ClassOrModule::Mock01
24
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock01
25
25
  end
26
26
  block_ran.should == true
27
27
  block_ran = false
28
28
  Object.new.instance_eval do
29
- extend ModuleCluster::Define::Block::ClassOrModule::Mock01
29
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock01
30
30
  end
31
31
  block_ran.should == false
32
32
  module ModuleProof
33
- extend ModuleCluster::Define::Block::ClassOrModule::Mock01
33
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock01
34
34
  end
35
35
  block_ran.should == false
36
36
  module ModuleProof2
37
- include ModuleCluster::Define::Block::ClassOrModule::Mock01
37
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock01
38
38
  end
39
39
  block_ran.should == true
40
40
  end
@@ -46,7 +46,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
46
46
 
47
47
  it 'can run a block on class or module extend' do
48
48
  module ModuleCluster::Define::Block::ClassOrModule::Mock02
49
- extend ModuleCluster::Define::Block::ClassOrModule
49
+ extend ::ModuleCluster::Define::Block::ClassOrModule
50
50
  block_ran = false
51
51
  class_or_module_extend do
52
52
  block_ran = true
@@ -54,24 +54,24 @@ describe ModuleCluster::Define::Block::ClassOrModule do
54
54
  end
55
55
  respond_to?( :extended ).should == true
56
56
  class ClassProof
57
- include ModuleCluster::Define::Block::ClassOrModule::Mock02
57
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock02
58
58
  end
59
59
  block_ran.should == false
60
60
  class ClassProof2
61
- extend ModuleCluster::Define::Block::ClassOrModule::Mock02
61
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock02
62
62
  end
63
63
  block_ran.should == true
64
64
  block_ran = false
65
65
  Object.new.instance_eval do
66
- extend ModuleCluster::Define::Block::ClassOrModule::Mock02
66
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock02
67
67
  end
68
68
  block_ran.should == false
69
69
  module ModuleProof
70
- include ModuleCluster::Define::Block::ClassOrModule::Mock02
70
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock02
71
71
  end
72
72
  block_ran.should == false
73
73
  module ModuleProof2
74
- extend ModuleCluster::Define::Block::ClassOrModule::Mock02
74
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock02
75
75
  end
76
76
  block_ran.should == true
77
77
  end end
@@ -82,7 +82,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
82
82
 
83
83
  it 'can run a block on class or module include or extend' do
84
84
  module ModuleCluster::Define::Block::ClassOrModule::Mock03
85
- extend ModuleCluster::Define::Block::ClassOrModule
85
+ extend ::ModuleCluster::Define::Block::ClassOrModule
86
86
  block_ran = false
87
87
  class_or_module_include_or_extend do
88
88
  block_ran = true
@@ -90,26 +90,26 @@ describe ModuleCluster::Define::Block::ClassOrModule do
90
90
  end
91
91
  respond_to?( :extended ).should == true
92
92
  class ClassProof
93
- include ModuleCluster::Define::Block::ClassOrModule::Mock03
93
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock03
94
94
  end
95
95
  block_ran.should == true
96
96
  block_ran = false
97
97
  class ClassProof2
98
- extend ModuleCluster::Define::Block::ClassOrModule::Mock03
98
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock03
99
99
  end
100
100
  block_ran.should == true
101
101
  block_ran = false
102
102
  Object.new.instance_eval do
103
- extend ModuleCluster::Define::Block::ClassOrModule::Mock03
103
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock03
104
104
  end
105
105
  block_ran.should == false
106
106
  module ModuleProof
107
- include ModuleCluster::Define::Block::ClassOrModule::Mock03
107
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock03
108
108
  end
109
109
  block_ran.should == true
110
110
  block_ran = false
111
111
  module ModuleProof2
112
- extend ModuleCluster::Define::Block::ClassOrModule::Mock03
112
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock03
113
113
  end
114
114
  block_ran.should == true
115
115
  end
@@ -121,7 +121,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
121
121
 
122
122
  it 'can run a block before class or module include' do
123
123
  module ModuleCluster::Define::Block::ClassOrModule::Mock04
124
- extend ModuleCluster::Define::Block::ClassOrModule
124
+ extend ::ModuleCluster::Define::Block::ClassOrModule
125
125
  block_ran = false
126
126
  prepend_class_or_module_include do
127
127
  block_ran = true
@@ -129,24 +129,24 @@ describe ModuleCluster::Define::Block::ClassOrModule do
129
129
  end
130
130
  respond_to?( :included ).should == true
131
131
  class ClassProof
132
- extend ModuleCluster::Define::Block::ClassOrModule::Mock04
132
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock04
133
133
  end
134
134
  block_ran.should == false
135
135
  class ClassProof2
136
- include ModuleCluster::Define::Block::ClassOrModule::Mock04
136
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock04
137
137
  end
138
138
  block_ran.should == true
139
139
  block_ran = false
140
140
  Object.new.instance_eval do
141
- extend ModuleCluster::Define::Block::ClassOrModule::Mock04
141
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock04
142
142
  end
143
143
  block_ran.should == false
144
144
  module ModuleProof
145
- extend ModuleCluster::Define::Block::ClassOrModule::Mock04
145
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock04
146
146
  end
147
147
  block_ran.should == false
148
148
  module ModuleProof2
149
- include ModuleCluster::Define::Block::ClassOrModule::Mock04
149
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock04
150
150
  end
151
151
  block_ran.should == true
152
152
  end
@@ -158,7 +158,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
158
158
 
159
159
  it 'can run a block before class or module extend' do
160
160
  module ModuleCluster::Define::Block::ClassOrModule::Mock05
161
- extend ModuleCluster::Define::Block::ClassOrModule
161
+ extend ::ModuleCluster::Define::Block::ClassOrModule
162
162
  block_ran = false
163
163
  prepend_class_or_module_extend do
164
164
  block_ran = true
@@ -166,24 +166,24 @@ describe ModuleCluster::Define::Block::ClassOrModule do
166
166
  end
167
167
  respond_to?( :extended ).should == true
168
168
  class ClassProof
169
- include ModuleCluster::Define::Block::ClassOrModule::Mock05
169
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock05
170
170
  end
171
171
  block_ran.should == false
172
172
  class ClassProof2
173
- extend ModuleCluster::Define::Block::ClassOrModule::Mock05
173
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock05
174
174
  end
175
175
  block_ran.should == true
176
176
  block_ran = false
177
177
  Object.new.instance_eval do
178
- extend ModuleCluster::Define::Block::ClassOrModule::Mock05
178
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock05
179
179
  end
180
180
  block_ran.should == false
181
181
  module ModuleProof
182
- include ModuleCluster::Define::Block::ClassOrModule::Mock05
182
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock05
183
183
  end
184
184
  block_ran.should == false
185
185
  module ModuleProof2
186
- extend ModuleCluster::Define::Block::ClassOrModule::Mock05
186
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock05
187
187
  end
188
188
  block_ran.should == true
189
189
  end
@@ -195,7 +195,7 @@ describe ModuleCluster::Define::Block::ClassOrModule do
195
195
 
196
196
  it 'can run a block before class or module include or extend' do
197
197
  module ModuleCluster::Define::Block::ClassOrModule::Mock06
198
- extend ModuleCluster::Define::Block::ClassOrModule
198
+ extend ::ModuleCluster::Define::Block::ClassOrModule
199
199
  block_ran = false
200
200
  prepend_class_or_module_include_or_extend do
201
201
  block_ran = true
@@ -203,26 +203,26 @@ describe ModuleCluster::Define::Block::ClassOrModule do
203
203
  end
204
204
  respond_to?( :extended ).should == true
205
205
  class ClassProof
206
- include ModuleCluster::Define::Block::ClassOrModule::Mock06
206
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock06
207
207
  end
208
208
  block_ran.should == true
209
209
  block_ran = false
210
210
  class ClassProof2
211
- extend ModuleCluster::Define::Block::ClassOrModule::Mock06
211
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock06
212
212
  end
213
213
  block_ran.should == true
214
214
  block_ran = false
215
215
  Object.new.instance_eval do
216
- extend ModuleCluster::Define::Block::ClassOrModule::Mock06
216
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock06
217
217
  end
218
218
  block_ran.should == false
219
219
  module ModuleProof
220
- include ModuleCluster::Define::Block::ClassOrModule::Mock06
220
+ include ::ModuleCluster::Define::Block::ClassOrModule::Mock06
221
221
  end
222
222
  block_ran.should == true
223
223
  block_ran = false
224
224
  module ModuleProof2
225
- extend ModuleCluster::Define::Block::ClassOrModule::Mock06
225
+ extend ::ModuleCluster::Define::Block::ClassOrModule::Mock06
226
226
  end
227
227
  block_ran.should == true
228
228
  end
@@ -0,0 +1,54 @@
1
+
2
+ require_relative '../../../../lib/module-cluster.rb'
3
+
4
+ describe ModuleCluster::Define::Block::ClassOrSubclass do
5
+
6
+ ###############################
7
+ # class_include_or_subclass #
8
+ ###############################
9
+
10
+ it 'can run a block on class or module extend' do
11
+ module ModuleCluster::Define::Block::ClassOrSubclass::Mock01
12
+ extend ::ModuleCluster::Define::Block::ClassOrSubclass
13
+ block_ran = false
14
+ class_include_or_subclass do |class_instance|
15
+ block_ran = true
16
+ end
17
+ respond_to?( :extended ).should == true
18
+ module ModuleProof
19
+ include ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
20
+ end
21
+ block_ran.should == false
22
+ block_ran = false
23
+ module ModuleProof2
24
+ extend ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
25
+ end
26
+ block_ran.should == false
27
+ block_ran = false
28
+ class ClassProof
29
+ include ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
30
+ end
31
+ block_ran.should == true
32
+ block_ran = false
33
+ class ClassProof2
34
+ extend ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
35
+ end
36
+ block_ran.should == false
37
+ block_ran = false
38
+ Object.new.instance_eval do
39
+ extend ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
40
+ end
41
+ block_ran.should == false
42
+ class SubClassProof < ClassProof
43
+ include ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
44
+ end
45
+ block_ran.should == true
46
+ block_ran = false
47
+ class SubSubClassProof < SubClassProof
48
+ include ::ModuleCluster::Define::Block::ClassOrSubclass::Mock01
49
+ end
50
+ block_ran.should == true
51
+ end
52
+ end
53
+
54
+ end
@@ -9,7 +9,7 @@ describe ModuleCluster::Define::Block::Class do
9
9
 
10
10
  it 'can run a block on class include' do
11
11
  module ModuleCluster::Define::Block::Class::Mock01
12
- extend ModuleCluster::Define::Block::Class
12
+ extend ::ModuleCluster::Define::Block::Class
13
13
  block_ran = false
14
14
  class_include do
15
15
  block_ran = true
@@ -17,23 +17,23 @@ describe ModuleCluster::Define::Block::Class do
17
17
  end
18
18
  respond_to?( :included ).should == true
19
19
  module ModuleProof
20
- include ModuleCluster::Define::Block::Class::Mock01
20
+ include ::ModuleCluster::Define::Block::Class::Mock01
21
21
  end
22
22
  block_ran.should == false
23
23
  module ModuleProof2
24
- extend ModuleCluster::Define::Block::Class::Mock01
24
+ extend ::ModuleCluster::Define::Block::Class::Mock01
25
25
  end
26
26
  block_ran.should == false
27
27
  Object.new.instance_eval do
28
- extend ModuleCluster::Define::Block::Class::Mock01
28
+ extend ::ModuleCluster::Define::Block::Class::Mock01
29
29
  end
30
30
  block_ran.should == false
31
31
  class ClassProof
32
- extend ModuleCluster::Define::Block::Class::Mock01
32
+ extend ::ModuleCluster::Define::Block::Class::Mock01
33
33
  end
34
34
  block_ran.should == false
35
35
  class ClassProof2
36
- include ModuleCluster::Define::Block::Class::Mock01
36
+ include ::ModuleCluster::Define::Block::Class::Mock01
37
37
  end
38
38
  block_ran.should == true
39
39
  end
@@ -45,7 +45,7 @@ describe ModuleCluster::Define::Block::Class do
45
45
 
46
46
  it 'can run a block on class extend' do
47
47
  module ModuleCluster::Define::Block::Class::Mock02
48
- extend ModuleCluster::Define::Block::Class
48
+ extend ::ModuleCluster::Define::Block::Class
49
49
  block_ran = false
50
50
  class_extend do
51
51
  block_ran = true
@@ -53,23 +53,23 @@ describe ModuleCluster::Define::Block::Class do
53
53
  end
54
54
  respond_to?( :extended ).should == true
55
55
  module ModuleProof
56
- include ModuleCluster::Define::Block::Class::Mock02
56
+ include ::ModuleCluster::Define::Block::Class::Mock02
57
57
  end
58
58
  block_ran.should == false
59
59
  module ModuleProof2
60
- extend ModuleCluster::Define::Block::Class::Mock02
60
+ extend ::ModuleCluster::Define::Block::Class::Mock02
61
61
  end
62
62
  block_ran.should == false
63
63
  Object.new.instance_eval do
64
- extend ModuleCluster::Define::Block::Class::Mock02
64
+ extend ::ModuleCluster::Define::Block::Class::Mock02
65
65
  end
66
66
  block_ran.should == false
67
67
  class ClassProof
68
- include ModuleCluster::Define::Block::Class::Mock02
68
+ include ::ModuleCluster::Define::Block::Class::Mock02
69
69
  end
70
70
  block_ran.should == false
71
71
  class ClassProof2
72
- extend ModuleCluster::Define::Block::Class::Mock02
72
+ extend ::ModuleCluster::Define::Block::Class::Mock02
73
73
  end
74
74
  block_ran.should == true
75
75
  end
@@ -81,7 +81,7 @@ describe ModuleCluster::Define::Block::Class do
81
81
 
82
82
  it 'can run a block on class include or extend' do
83
83
  module ModuleCluster::Define::Block::Class::Mock03
84
- extend ModuleCluster::Define::Block::Class
84
+ extend ::ModuleCluster::Define::Block::Class
85
85
  block_ran = false
86
86
  class_include_or_extend do
87
87
  block_ran = true
@@ -89,24 +89,24 @@ describe ModuleCluster::Define::Block::Class do
89
89
  end
90
90
  respond_to?( :extended ).should == true
91
91
  module ModuleProof
92
- include ModuleCluster::Define::Block::Class::Mock03
92
+ include ::ModuleCluster::Define::Block::Class::Mock03
93
93
  end
94
94
  block_ran.should == false
95
95
  module ModuleProof2
96
- extend ModuleCluster::Define::Block::Class::Mock03
96
+ extend ::ModuleCluster::Define::Block::Class::Mock03
97
97
  end
98
98
  block_ran.should == false
99
99
  Object.new.instance_eval do
100
- extend ModuleCluster::Define::Block::Class::Mock03
100
+ extend ::ModuleCluster::Define::Block::Class::Mock03
101
101
  end
102
102
  block_ran.should == false
103
103
  class ClassProof
104
- include ModuleCluster::Define::Block::Class::Mock03
104
+ include ::ModuleCluster::Define::Block::Class::Mock03
105
105
  end
106
106
  block_ran.should == true
107
107
  block_ran = false
108
108
  class ClassProof2
109
- extend ModuleCluster::Define::Block::Class::Mock03
109
+ extend ::ModuleCluster::Define::Block::Class::Mock03
110
110
  end
111
111
  block_ran.should == true
112
112
  end
@@ -118,7 +118,7 @@ describe ModuleCluster::Define::Block::Class do
118
118
 
119
119
  it 'can run a block before class include' do
120
120
  module ModuleCluster::Define::Block::Class::Mock04
121
- extend ModuleCluster::Define::Block::Class
121
+ extend ::ModuleCluster::Define::Block::Class
122
122
  block_ran = false
123
123
  prepend_class_include do
124
124
  block_ran = true
@@ -126,23 +126,23 @@ describe ModuleCluster::Define::Block::Class do
126
126
  end
127
127
  respond_to?( :included ).should == true
128
128
  module ModuleProof
129
- include ModuleCluster::Define::Block::Class::Mock04
129
+ include ::ModuleCluster::Define::Block::Class::Mock04
130
130
  end
131
131
  block_ran.should == false
132
132
  module ModuleProof2
133
- extend ModuleCluster::Define::Block::Class::Mock04
133
+ extend ::ModuleCluster::Define::Block::Class::Mock04
134
134
  end
135
135
  block_ran.should == false
136
136
  Object.new.instance_eval do
137
- extend ModuleCluster::Define::Block::Class::Mock04
137
+ extend ::ModuleCluster::Define::Block::Class::Mock04
138
138
  end
139
139
  block_ran.should == false
140
140
  class ClassProof
141
- extend ModuleCluster::Define::Block::Class::Mock04
141
+ extend ::ModuleCluster::Define::Block::Class::Mock04
142
142
  end
143
143
  block_ran.should == false
144
144
  class ClassProof2
145
- include ModuleCluster::Define::Block::Class::Mock04
145
+ include ::ModuleCluster::Define::Block::Class::Mock04
146
146
  end
147
147
  block_ran.should == true
148
148
  end
@@ -154,7 +154,7 @@ describe ModuleCluster::Define::Block::Class do
154
154
 
155
155
  it 'can run a block before class extend' do
156
156
  module ModuleCluster::Define::Block::Class::Mock05
157
- extend ModuleCluster::Define::Block::Class
157
+ extend ::ModuleCluster::Define::Block::Class
158
158
  block_ran = false
159
159
  prepend_class_extend do
160
160
  block_ran = true
@@ -162,23 +162,23 @@ describe ModuleCluster::Define::Block::Class do
162
162
  end
163
163
  respond_to?( :extended ).should == true
164
164
  module ModuleProof
165
- include ModuleCluster::Define::Block::Class::Mock05
165
+ include ::ModuleCluster::Define::Block::Class::Mock05
166
166
  end
167
167
  block_ran.should == false
168
168
  module ModuleProof2
169
- extend ModuleCluster::Define::Block::Class::Mock05
169
+ extend ::ModuleCluster::Define::Block::Class::Mock05
170
170
  end
171
171
  block_ran.should == false
172
172
  Object.new.instance_eval do
173
- extend ModuleCluster::Define::Block::Class::Mock05
173
+ extend ::ModuleCluster::Define::Block::Class::Mock05
174
174
  end
175
175
  block_ran.should == false
176
176
  class ClassProof
177
- include ModuleCluster::Define::Block::Class::Mock05
177
+ include ::ModuleCluster::Define::Block::Class::Mock05
178
178
  end
179
179
  block_ran.should == false
180
180
  class ClassProof2
181
- extend ModuleCluster::Define::Block::Class::Mock05
181
+ extend ::ModuleCluster::Define::Block::Class::Mock05
182
182
  end
183
183
  block_ran.should == true
184
184
  end
@@ -190,7 +190,7 @@ describe ModuleCluster::Define::Block::Class do
190
190
 
191
191
  it 'can run a block before class include or extend' do
192
192
  module ModuleCluster::Define::Block::Class::Mock06
193
- extend ModuleCluster::Define::Block::Class
193
+ extend ::ModuleCluster::Define::Block::Class
194
194
  block_ran = false
195
195
  prepend_class_include_or_extend do
196
196
  block_ran = true
@@ -198,24 +198,24 @@ describe ModuleCluster::Define::Block::Class do
198
198
  end
199
199
  respond_to?( :extended ).should == true
200
200
  module ModuleProof
201
- include ModuleCluster::Define::Block::Class::Mock06
201
+ include ::ModuleCluster::Define::Block::Class::Mock06
202
202
  end
203
203
  block_ran.should == false
204
204
  module ModuleProof2
205
- extend ModuleCluster::Define::Block::Class::Mock06
205
+ extend ::ModuleCluster::Define::Block::Class::Mock06
206
206
  end
207
207
  block_ran.should == false
208
208
  Object.new.instance_eval do
209
- extend ModuleCluster::Define::Block::Class::Mock06
209
+ extend ::ModuleCluster::Define::Block::Class::Mock06
210
210
  end
211
211
  block_ran.should == false
212
212
  class ClassProof
213
- include ModuleCluster::Define::Block::Class::Mock06
213
+ include ::ModuleCluster::Define::Block::Class::Mock06
214
214
  end
215
215
  block_ran.should == true
216
216
  block_ran = false
217
217
  class ClassProof2
218
- extend ModuleCluster::Define::Block::Class::Mock06
218
+ extend ::ModuleCluster::Define::Block::Class::Mock06
219
219
  end
220
220
  block_ran.should == true
221
221
  end