module-cluster 1.4.4 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/README.md +21 -0
  2. data/README.rdoc +21 -0
  3. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClass.rb +83 -0
  4. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClassOrModule.rb +70 -0
  5. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModule.rb +79 -0
  6. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModuleOrSubclass.rb +22 -0
  7. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +15 -7
  8. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +15 -7
  9. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +15 -7
  10. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +15 -7
  11. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +11 -3
  12. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +10 -2
  13. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +15 -3
  14. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +15 -7
  15. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +15 -7
  16. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +10 -2
  17. data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +13 -2
  18. data/lib/module-cluster/ModuleCluster/Define/Block.rb +1 -1
  19. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +19 -19
  20. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +34 -34
  21. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +19 -19
  22. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +19 -19
  23. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +19 -19
  24. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +19 -19
  25. data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +1 -1
  26. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -3
  27. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +19 -19
  28. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +43 -43
  29. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +34 -34
  30. data/lib/module-cluster/ModuleCluster/Define/Status.rb +1 -1
  31. data/lib/module-cluster/ModuleCluster/Define.rb +1 -1
  32. data/lib/module-cluster/ModuleCluster/Suspend/Hooks.rb +1 -1
  33. data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +1 -1
  34. data/lib/module-cluster/ModuleCluster/Suspend.rb +1 -1
  35. data/lib/module-cluster/ModuleCluster.rb +1 -1
  36. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +3 -3
  37. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +85 -32
  38. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/Subclass.rb +6 -3
  39. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +5 -5
  40. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +9 -9
  41. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Inherited.rb +3 -3
  42. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +5 -5
  43. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +9 -9
  44. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +1 -0
  45. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +1 -1
  46. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +13 -13
  47. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +10 -10
  48. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +13 -13
  49. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +10 -10
  50. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb +1 -1
  51. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb +1 -1
  52. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb +1 -1
  53. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +1 -1
  54. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade/Subclass.rb +1 -1
  55. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +1 -1
  56. data/lib/module-cluster.rb +14 -2
  57. data/spec/ModuleCluster/Define/Block/CascadingClassOrModule_spec.rb +285 -0
  58. data/spec/ModuleCluster/Define/Block/CascadingClass_spec.rb +241 -0
  59. data/spec/ModuleCluster/Define/Block/CascadingModuleOrSubclass_spec.rb +56 -0
  60. data/spec/ModuleCluster/Define/Block/CascadingModule_spec.rb +278 -0
  61. data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +13 -13
  62. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +13 -13
  63. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +2 -3
  64. data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +13 -13
  65. data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +2 -2
  66. data/spec/ModuleCluster/Define/Block/Class_spec.rb +13 -13
  67. data/spec/ModuleCluster/Define/Block/Instance_spec.rb +5 -5
  68. data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +1 -1
  69. data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +2 -4
  70. data/spec/ModuleCluster/Define/Block/Module_spec.rb +13 -13
  71. data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +8 -8
  72. data/spec/ModuleCluster/Define/Block_spec.rb +9 -9
  73. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +227 -227
  74. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +197 -197
  75. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +228 -228
  76. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +232 -232
  77. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +224 -224
  78. data/spec/ModuleCluster/Define/Cluster_spec.rb +221 -221
  79. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +29 -29
  80. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +227 -227
  81. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +227 -227
  82. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +197 -197
  83. data/spec/ModuleCluster/Suspend/Hooks_spec.rb +120 -120
  84. data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +120 -120
  85. data/spec/ModuleCluster_spec.rb +2 -2
  86. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +192 -192
  87. data/spec/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy_spec.rb +129 -129
  88. data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +17 -17
  89. metadata +9 -1
@@ -1,14 +1,14 @@
1
1
 
2
2
  require_relative '../../../lib/module-cluster.rb'
3
3
 
4
- describe ModuleCluster::Suspend::WithoutHooks do
4
+ describe ::ModuleCluster::Suspend::WithoutHooks do
5
5
 
6
6
  #######################
7
7
  # without_any_hooks #
8
8
  #######################
9
9
 
10
10
  it 'can suspend and resume all hooks at once or all hooks matching a description' do
11
- module ModuleCluster::Suspend::WithoutHooks::Mock01
11
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock01
12
12
  extend ::ModuleCluster::Suspend::WithoutHooks
13
13
  # required to provide #cluster_stack
14
14
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -21,37 +21,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
21
21
  module Module4
22
22
  end
23
23
  # prepend include
24
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
25
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
26
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
27
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
24
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
25
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
26
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
27
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
28
28
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
29
29
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
30
30
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
31
31
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
32
32
  # prepend extend
33
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
34
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
35
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
36
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
33
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
34
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
35
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
36
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
37
37
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
38
38
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
39
39
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
40
40
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
41
41
  # include
42
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
43
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
44
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
45
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
42
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
43
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
44
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
45
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
46
46
  cluster_stack.include_hooks.push( include_set_one )
47
47
  cluster_stack.include_hooks.push( include_set_two )
48
48
  cluster_stack.include_hooks.push( include_set_three )
49
49
  cluster_stack.include_hooks.push( include_set_four )
50
50
  # extend
51
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
52
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
53
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
54
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
51
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
52
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
53
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
54
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
55
55
  cluster_stack.extend_hooks.push( extend_set_one )
56
56
  cluster_stack.extend_hooks.push( extend_set_two )
57
57
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -87,7 +87,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
87
87
  ###############################
88
88
 
89
89
  it 'can suspend and resume all include or prepending include hooks at once or any include or prepending include hooks matching a description' do
90
- module ModuleCluster::Suspend::WithoutHooks::Mock02
90
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock02
91
91
  extend ::ModuleCluster::Suspend::WithoutHooks
92
92
  # required to provide #cluster_stack
93
93
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -100,37 +100,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
100
100
  module Module4
101
101
  end
102
102
  # prepend include
103
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
104
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
105
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
106
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
103
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
104
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
105
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
106
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
107
107
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
108
108
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
109
109
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
110
110
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
111
111
  # prepend extend
112
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
113
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
114
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
115
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
112
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
113
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
114
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
115
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
116
116
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
117
117
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
118
118
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
119
119
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
120
120
  # include
121
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
122
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
123
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
124
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
121
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
122
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
123
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
124
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
125
125
  cluster_stack.include_hooks.push( include_set_one )
126
126
  cluster_stack.include_hooks.push( include_set_two )
127
127
  cluster_stack.include_hooks.push( include_set_three )
128
128
  cluster_stack.include_hooks.push( include_set_four )
129
129
  # extend
130
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
131
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
132
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
133
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
130
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
131
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
132
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
133
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
134
134
  cluster_stack.extend_hooks.push( extend_set_one )
135
135
  cluster_stack.extend_hooks.push( extend_set_two )
136
136
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -166,7 +166,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
166
166
  ##############################
167
167
 
168
168
  it 'can suspend and resume all extend or prepending extend hooks at once or any extend or prepending extend hooks matching a description' do
169
- module ModuleCluster::Suspend::WithoutHooks::Mock03
169
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock03
170
170
  extend ::ModuleCluster::Suspend::WithoutHooks
171
171
  # required to provide #cluster_stack
172
172
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -179,37 +179,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
179
179
  module Module4
180
180
  end
181
181
  # prepend include
182
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
183
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
184
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
185
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
182
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
183
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
184
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
185
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
186
186
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
187
187
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
188
188
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
189
189
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
190
190
  # prepend extend
191
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
192
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
193
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
194
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
191
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
192
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
193
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
194
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
195
195
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
196
196
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
197
197
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
198
198
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
199
199
  # include
200
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
201
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
202
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
203
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
200
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
201
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
202
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
203
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
204
204
  cluster_stack.include_hooks.push( include_set_one )
205
205
  cluster_stack.include_hooks.push( include_set_two )
206
206
  cluster_stack.include_hooks.push( include_set_three )
207
207
  cluster_stack.include_hooks.push( include_set_four )
208
208
  # extend
209
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
210
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
211
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
212
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
209
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
210
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
211
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
212
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
213
213
  cluster_stack.extend_hooks.push( extend_set_one )
214
214
  cluster_stack.extend_hooks.push( extend_set_two )
215
215
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -245,7 +245,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
245
245
  ###########################
246
246
 
247
247
  it 'can suspend and resume all include hooks at once or any include hooks matching a description' do
248
- module ModuleCluster::Suspend::WithoutHooks::Mock04
248
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock04
249
249
  extend ::ModuleCluster::Suspend::WithoutHooks
250
250
  # required to provide #cluster_stack
251
251
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -258,37 +258,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
258
258
  module Module4
259
259
  end
260
260
  # prepend include
261
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
262
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
263
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
264
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
261
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
262
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
263
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
264
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
265
265
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
266
266
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
267
267
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
268
268
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
269
269
  # prepend extend
270
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
271
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
272
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
273
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
270
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
271
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
272
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
273
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
274
274
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
275
275
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
276
276
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
277
277
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
278
278
  # include
279
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
280
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
281
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
282
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
279
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
280
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
281
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
282
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
283
283
  cluster_stack.include_hooks.push( include_set_one )
284
284
  cluster_stack.include_hooks.push( include_set_two )
285
285
  cluster_stack.include_hooks.push( include_set_three )
286
286
  cluster_stack.include_hooks.push( include_set_four )
287
287
  # extend
288
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
289
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
290
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
291
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
288
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
289
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
290
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
291
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
292
292
  cluster_stack.extend_hooks.push( extend_set_one )
293
293
  cluster_stack.extend_hooks.push( extend_set_two )
294
294
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -324,7 +324,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
324
324
  ##########################
325
325
 
326
326
  it 'can suspend and resume all extend hooks at once or any extend hooks matching a description' do
327
- module ModuleCluster::Suspend::WithoutHooks::Mock05
327
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock05
328
328
  extend ::ModuleCluster::Suspend::WithoutHooks
329
329
  # required to provide #cluster_stack
330
330
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -337,37 +337,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
337
337
  module Module4
338
338
  end
339
339
  # prepend include
340
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
341
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
342
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
343
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
340
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
341
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
342
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
343
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
344
344
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
345
345
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
346
346
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
347
347
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
348
348
  # prepend extend
349
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
350
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
351
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
352
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
349
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
350
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
351
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
352
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
353
353
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
354
354
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
355
355
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
356
356
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
357
357
  # include
358
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
359
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
360
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
361
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
358
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
359
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
360
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
361
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
362
362
  cluster_stack.include_hooks.push( include_set_one )
363
363
  cluster_stack.include_hooks.push( include_set_two )
364
364
  cluster_stack.include_hooks.push( include_set_three )
365
365
  cluster_stack.include_hooks.push( include_set_four )
366
366
  # extend
367
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
368
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
369
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
370
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
367
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
368
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
369
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
370
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
371
371
  cluster_stack.extend_hooks.push( extend_set_one )
372
372
  cluster_stack.extend_hooks.push( extend_set_two )
373
373
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -403,7 +403,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
403
403
  ###################################
404
404
 
405
405
  it 'can suspend and resume all prepending include hooks at once or any prepending include hooks matching a description' do
406
- module ModuleCluster::Suspend::WithoutHooks::Mock06
406
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock06
407
407
  extend ::ModuleCluster::Suspend::WithoutHooks
408
408
  # required to provide #cluster_stack
409
409
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -416,37 +416,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
416
416
  module Module4
417
417
  end
418
418
  # prepend include
419
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
420
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
421
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
422
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
419
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
420
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
421
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
422
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
423
423
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
424
424
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
425
425
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
426
426
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
427
427
  # prepend extend
428
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
429
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
430
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
431
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
428
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
429
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
430
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
431
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
432
432
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
433
433
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
434
434
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
435
435
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
436
436
  # include
437
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
438
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
439
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
440
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
437
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
438
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
439
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
440
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
441
441
  cluster_stack.include_hooks.push( include_set_one )
442
442
  cluster_stack.include_hooks.push( include_set_two )
443
443
  cluster_stack.include_hooks.push( include_set_three )
444
444
  cluster_stack.include_hooks.push( include_set_four )
445
445
  # extend
446
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
447
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
448
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
449
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
446
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
447
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
448
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
449
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
450
450
  cluster_stack.extend_hooks.push( extend_set_one )
451
451
  cluster_stack.extend_hooks.push( extend_set_two )
452
452
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -482,7 +482,7 @@ describe ModuleCluster::Suspend::WithoutHooks do
482
482
  ##################################
483
483
 
484
484
  it 'can suspend and resume all prepending extend hooks at once or any prepending extend hooks matching a description' do
485
- module ModuleCluster::Suspend::WithoutHooks::Mock07
485
+ module ::ModuleCluster::Suspend::WithoutHooks::Mock07
486
486
  extend ::ModuleCluster::Suspend::WithoutHooks
487
487
  # required to provide #cluster_stack
488
488
  extend ::ModuleCluster::CascadeFeatures::ClusterStack
@@ -495,37 +495,37 @@ describe ModuleCluster::Suspend::WithoutHooks do
495
495
  module Module4
496
496
  end
497
497
  # prepend include
498
- prepend_include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
499
- prepend_include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
500
- prepend_include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
501
- prepend_include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
498
+ prepend_include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
499
+ prepend_include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
500
+ prepend_include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
501
+ prepend_include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
502
502
  cluster_stack.prepend_include_hooks.push( prepend_include_set_one )
503
503
  cluster_stack.prepend_include_hooks.push( prepend_include_set_two )
504
504
  cluster_stack.prepend_include_hooks.push( prepend_include_set_three )
505
505
  cluster_stack.prepend_include_hooks.push( prepend_include_set_four )
506
506
  # prepend extend
507
- prepend_extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
508
- prepend_extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
509
- prepend_extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
510
- prepend_extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
507
+ prepend_extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
508
+ prepend_extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, true, :two )
509
+ prepend_extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
510
+ prepend_extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
511
511
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_one )
512
512
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_two )
513
513
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_three )
514
514
  cluster_stack.prepend_extend_hooks.push( prepend_extend_set_four )
515
515
  # include
516
- include_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
517
- include_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
518
- include_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
519
- include_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
516
+ include_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
517
+ include_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
518
+ include_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, true, :three )
519
+ include_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, false, :four )
520
520
  cluster_stack.include_hooks.push( include_set_one )
521
521
  cluster_stack.include_hooks.push( include_set_two )
522
522
  cluster_stack.include_hooks.push( include_set_three )
523
523
  cluster_stack.include_hooks.push( include_set_four )
524
524
  # extend
525
- extend_set_one = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
526
- extend_set_two = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
527
- extend_set_three = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
528
- extend_set_four = ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
525
+ extend_set_one = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module1 ], nil, false, :one )
526
+ extend_set_two = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include, [ Module2 ], nil, false, :two )
527
+ extend_set_three = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :extend, [ Module3 ], nil, false, :three )
528
+ extend_set_four = ::ModuleCluster::ClusterStack::Set.new( Kernel, :some_method, :all, :include_and_extend, [ Module4 ], nil, true, :four )
529
529
  cluster_stack.extend_hooks.push( extend_set_one )
530
530
  cluster_stack.extend_hooks.push( extend_set_two )
531
531
  cluster_stack.extend_hooks.push( extend_set_three )
@@ -1,9 +1,9 @@
1
1
  require_relative '../lib/module-cluster.rb'
2
2
 
3
- describe ModuleCluster do
3
+ describe ::ModuleCluster do
4
4
 
5
5
  it 'clusters other modules' do
6
- module ModuleCluster
6
+ module ::ModuleCluster
7
7
  is_a?( Define::Cluster )
8
8
  is_a?( Define::ClusterCascades )
9
9
  is_a?( Define::ClusterCascadesToClass )