module-cluster 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,11 +11,83 @@ module ModuleCluster::ExtendSupport
11
11
  super if defined?( super )
12
12
  module_self = self
13
13
  class_or_module.instance_eval do
14
- ModuleCluster::ExtendSupport.includes_for_class_or_module( module_self ).each do |this_module|
15
- include this_module
14
+ # cascade ModuleCluster support
15
+ extend ModuleCluster
16
+ # take care of anything we're supposed to include when we are extended
17
+ ModuleCluster::ExtendSupport.included_sets( module_self ).each do |this_set|
18
+ # if we have a set intended to cascade only to classes
19
+ if this_set.is_a?( Array::CascadeToClass ) or this_set.is_a?( Array::CascadeToClassOrModule )
20
+ # and we have a class
21
+ if is_a?( Class ) or this_set.is_a?( Array::CascadeToClassOrModule )
22
+ # include the set
23
+ include( *this_set )
24
+ end
25
+ unless is_a?( Class )
26
+ if this_set.is_a?( Array::CascadeToClass )
27
+ # cascade our includes to the next module
28
+ define_module_extended_cascades_to_class do |included, extended|
29
+ included.concat( this_set )
30
+ end
31
+ if ModuleCluster::ExtendSupport.include_cluster?( module_self, *this_set )
32
+ define_module_included_cascades_to_class do |included, extended|
33
+ included.concat( this_set )
34
+ end
35
+ end
36
+ else
37
+ # cascade our includes to the next module
38
+ define_module_extended_cascades do |included, extended|
39
+ included.concat( this_set )
40
+ end
41
+ if ModuleCluster::ExtendSupport.include_cluster?( module_self, *this_set )
42
+ define_module_included_cascades do |included, extended|
43
+ included.concat( this_set )
44
+ end
45
+ end
46
+ end
47
+ end
48
+ # otherwise
49
+ else
50
+ # include the set
51
+ include( *this_set )
52
+ end
16
53
  end
17
- ModuleCluster::ExtendSupport.extends_for_class_or_module( module_self ).each do |this_module|
18
- extend this_module
54
+ # take care of anything we're supposed to extend when we are extended
55
+ ModuleCluster::ExtendSupport.extended_sets( module_self ).each do |this_set|
56
+ # if we have a set intended to cascade only to classes
57
+ if this_set.is_a?( Array::CascadeToClass ) or this_set.is_a?( Array::CascadeToClassOrModule )
58
+ # and we have a class
59
+ if is_a?( Class ) or this_set.is_a?( Array::CascadeToClassOrModule )
60
+ # extend the set
61
+ extend( *this_set )
62
+ end
63
+ unless is_a?( Class )
64
+ if this_set.is_a?( Array::CascadeToClass )
65
+ # cascade our extends to the next module
66
+ define_module_extended_cascades_to_class do |included, extended|
67
+ extended.concat( this_set )
68
+ end
69
+ if ModuleCluster::ExtendSupport.extend_cluster?( module_self, *this_set )
70
+ define_module_included_cascades_to_class do |included, extended|
71
+ extended.concat( this_set )
72
+ end
73
+ end
74
+ else
75
+ # cascade our extends to the next module
76
+ define_module_extended_cascades do |included, extended|
77
+ extended.concat( this_set )
78
+ end
79
+ if ModuleCluster::ExtendSupport.extend_cluster?( module_self, *this_set )
80
+ define_module_included_cascades do |included, extended|
81
+ extended.concat( this_set )
82
+ end
83
+ end
84
+ end
85
+ end
86
+ # otherwise
87
+ else
88
+ # extend the set
89
+ extend( *this_set )
90
+ end
19
91
  end
20
92
  end
21
93
  end
@@ -2,39 +2,103 @@
2
2
  module ModuleCluster::IncludeExtendSupport
3
3
 
4
4
  ######################################
5
- # set_includes_for_class_or_module #
5
+ # add_includes_for_class_or_module #
6
6
  ######################################
7
7
 
8
- def set_includes_for_class_or_module( class_or_module, includes )
9
- @includes_for_class_or_module ||= Hash.new
10
- @includes_for_class_or_module[ class_or_module ] ||= Array.new
11
- @includes_for_class_or_module[ class_or_module ].concat( includes )
8
+ def add_includes_for_class_or_module( class_or_module, includes )
9
+ included_sets( class_or_module ).push( includes ) unless includes.empty?
12
10
  end
13
11
 
14
12
  #####################################
15
- # set_extends_for_class_or_module #
13
+ # add_extends_for_class_or_module #
16
14
  #####################################
17
15
 
18
- def set_extends_for_class_or_module( class_or_module, extends )
19
- @extends_for_class_or_module ||= Hash.new
20
- @extends_for_class_or_module[ class_or_module ] ||= Array.new
21
- @extends_for_class_or_module[ class_or_module ].concat( extends )
16
+ def add_extends_for_class_or_module( class_or_module, extends )
17
+ extended_sets( class_or_module ).push( extends ) unless extends.empty?
22
18
  end
23
19
 
24
- ############################################
25
- # includes_for_class_or_module_inclusion #
26
- ############################################
20
+ ################################################
21
+ # add_cascading_includes_for_class_or_module #
22
+ ################################################
27
23
 
28
- def includes_for_class_or_module( class_or_module )
29
- return @includes_for_class_or_module[ class_or_module ] ||= Array.new
24
+ def add_cascading_includes_for_class_or_module( class_or_module, includes )
25
+ included_sets( class_or_module ).push( includes ) unless includes.empty?
30
26
  end
31
27
 
32
- ###########################################
33
- # extends_for_class_or_module_extension #
34
- ###########################################
28
+ ###############################################
29
+ # add_cascading_extends_for_class_or_module #
30
+ ###############################################
31
+
32
+ def add_cascading_extends_for_class_or_module( class_or_module, extends )
33
+ extended_sets( class_or_module ).push( extends ) unless extends.empty?
34
+ end
35
+
36
+ ######################################
37
+ # add_cascading_includes_for_class #
38
+ ######################################
39
+
40
+ def add_cascading_includes_for_class( klass, includes )
41
+ included_sets( klass ).push( includes ) unless includes.empty?
42
+ end
43
+
44
+ #####################################
45
+ # add_cascading_extends_for_class #
46
+ #####################################
47
+
48
+ def add_cascading_extends_for_class( klass, extends )
49
+ extended_sets( klass ).push( extends ) unless extends.empty?
50
+ end
51
+
52
+ ###################
53
+ # included_sets #
54
+ ###################
55
+
56
+ def included_sets( class_or_module )
57
+ return included_sets_hash[ class_or_module ] ||= Array.new
58
+ end
59
+
60
+ ###################
61
+ # extended_sets #
62
+ ###################
63
+
64
+ def extended_sets( class_or_module )
65
+ return extended_sets_hash[ class_or_module ] ||= Array.new
66
+ end
67
+
68
+ ####################
69
+ # set_as_cluster #
70
+ ####################
71
+
72
+ def set_as_cluster( class_or_module, includes, extends )
73
+ includes_cluster_hash_for_class_or_module( class_or_module ).concat( includes )
74
+ extends_cluster_hash_for_class_or_module( class_or_module ).concat( extends )
75
+ return self
76
+ end
77
+
78
+ ######################
79
+ # include_cluster? #
80
+ ######################
81
+
82
+ def include_cluster?( class_or_module, *modules )
83
+ include_set_as_cluster = true
84
+ modules.each do |this_module|
85
+ include_set_as_cluster = false unless includes_cluster_hash_for_class_or_module( class_or_module ).include?( this_module )
86
+ break unless include_set_as_cluster
87
+ end
88
+ return include_set_as_cluster
89
+ end
90
+
91
+ #####################
92
+ # extend_cluster? #
93
+ #####################
35
94
 
36
- def extends_for_class_or_module( class_or_module )
37
- return @extends_for_class_or_module[ class_or_module ] ||= Array.new
95
+ def extend_cluster?( class_or_module, *modules )
96
+ extend_set_as_cluster = true
97
+ modules.each do |this_module|
98
+ extend_set_as_cluster = false unless extends_cluster_hash_for_class_or_module( class_or_module ).include?( this_module )
99
+ break unless extend_set_as_cluster
100
+ end
101
+ return extend_set_as_cluster
38
102
  end
39
103
 
40
104
  end
@@ -11,11 +11,82 @@ module ModuleCluster::IncludeSupport
11
11
  super if defined?( super )
12
12
  module_self = self
13
13
  class_or_module.instance_eval do
14
- ModuleCluster::IncludeSupport.includes_for_class_or_module( module_self ).each do |this_module|
15
- include this_module
14
+ # cascade ModuleCluster support
15
+ extend ModuleCluster
16
+ ModuleCluster::IncludeSupport.included_sets( module_self ).each do |this_set|
17
+ # if we have a set intended to cascade only to classes
18
+ if this_set.is_a?( Array::CascadeToClass ) or this_set.is_a?( Array::CascadeToClassOrModule )
19
+ # and we have a class
20
+ if is_a?( Class ) or this_set.is_a?( Array::CascadeToClassOrModule )
21
+ # include the set
22
+ include( *this_set )
23
+ end
24
+ unless is_a?( Class )
25
+ if this_set.is_a?( Array::CascadeToClass )
26
+ # cascade our includes to the next module
27
+ define_module_included_cascades_to_class do |included, extended|
28
+ included.concat( this_set )
29
+ end
30
+ if ModuleCluster::IncludeSupport.include_cluster?( module_self, *this_set )
31
+ define_module_extended_cascades_to_class do |included, extended|
32
+ included.concat( this_set )
33
+ end
34
+ end
35
+ else
36
+ # cascade our includes to the next module
37
+ define_module_included_cascades do |included, extended|
38
+ included.concat( this_set )
39
+ end
40
+ if ModuleCluster::IncludeSupport.include_cluster?( module_self, *this_set )
41
+ define_module_extended_cascades do |included, extended|
42
+ included.concat( this_set )
43
+ end
44
+ end
45
+ end
46
+ end
47
+ # otherwise
48
+ else
49
+ # include the set
50
+ include( *this_set )
51
+ end
16
52
  end
17
- ModuleCluster::IncludeSupport.extends_for_class_or_module( module_self ).each do |this_module|
18
- extend this_module
53
+ # take care of anything we're supposed to extend when we are included
54
+ ModuleCluster::IncludeSupport.extended_sets( module_self ).each do |this_set|
55
+ # if we have a set intended to cascade only to classes
56
+ if this_set.is_a?( Array::CascadeToClass ) or this_set.is_a?( Array::CascadeToClassOrModule )
57
+ # and we have a class
58
+ if is_a?( Class ) or this_set.is_a?( Array::CascadeToClassOrModule )
59
+ # extend the set
60
+ extend( *this_set )
61
+ end
62
+ unless is_a?( Class )
63
+ if this_set.is_a?( Array::CascadeToClass )
64
+ # cascade our extends to the next module
65
+ define_module_included_cascades_to_class do |included, extended|
66
+ extended.concat( this_set )
67
+ end
68
+ if ModuleCluster::IncludeSupport.extend_cluster?( module_self, *this_set )
69
+ define_module_extended_cascades_to_class do |included, extended|
70
+ extended.concat( this_set )
71
+ end
72
+ end
73
+ else
74
+ # cascade our extends to the next module
75
+ define_module_included_cascades do |included, extended|
76
+ extended.concat( this_set )
77
+ end
78
+ if ModuleCluster::IncludeSupport.extend_cluster?( module_self, *this_set )
79
+ define_module_extended_cascades do |included, extended|
80
+ extended.concat( this_set )
81
+ end
82
+ end
83
+ end
84
+ end
85
+ # otherwise
86
+ else
87
+ # extend the set
88
+ extend( *this_set )
89
+ end
19
90
  end
20
91
  end
21
92
  end
@@ -0,0 +1,56 @@
1
+
2
+ module ModuleCluster::IncludeExtendSupport
3
+
4
+ ###########################################################################################################
5
+ private ###############################################################################################
6
+ ###########################################################################################################
7
+
8
+ ########################
9
+ # included_sets_hash #
10
+ ########################
11
+
12
+ def included_sets_hash
13
+ return @included_sets_hash ||= Hash.new
14
+ end
15
+
16
+ ########################
17
+ # extended_sets_hash #
18
+ ########################
19
+
20
+ def extended_sets_hash
21
+ return @extended_sets_hash ||= Hash.new
22
+ end
23
+
24
+ ##################
25
+ # cluster_hash #
26
+ ##################
27
+
28
+ def cluster_hash
29
+ return @cluster_hash ||= Hash.new
30
+ end
31
+
32
+ ######################################
33
+ # cluster_hash_for_class_or_module #
34
+ ######################################
35
+
36
+ def cluster_hash_for_class_or_module( class_or_module )
37
+ return cluster_hash[ class_or_module ] ||= Hash.new
38
+ end
39
+
40
+ ###############################################
41
+ # includes_cluster_hash_for_class_or_module #
42
+ ###############################################
43
+
44
+ def includes_cluster_hash_for_class_or_module( class_or_module )
45
+ return cluster_hash_for_class_or_module( class_or_module )[ :includes ] ||= Array.new
46
+ end
47
+
48
+ ##############################################
49
+ # extends_cluster_hash_for_class_or_module #
50
+ ##############################################
51
+
52
+ def extends_cluster_hash_for_class_or_module( class_or_module )
53
+ return cluster_hash_for_class_or_module( class_or_module )[ :extends ] ||= Array.new
54
+ end
55
+
56
+ end
@@ -5,11 +5,10 @@ module ModuleCluster
5
5
  private ###############################################################################################
6
6
  ###########################################################################################################
7
7
 
8
- def yield_for_includes_extends( block )
9
- inclusion_array = Array.new
10
- extension_array = Array.new
8
+ def yield_for_includes_extends( inclusion_array, extension_array, block )
11
9
  returned_includes, returned_extends = block.call( inclusion_array, extension_array )
12
- if returned_includes and returned_extends and returned_includes.is_a?( Array ) and returned_extends.is_a?( Array )
10
+ if returned_includes and returned_extends and
11
+ returned_includes.is_a?( Array ) and returned_extends.is_a?( Array )
13
12
  inclusion_array = returned_includes
14
13
  extension_array = returned_extends
15
14
  end
@@ -2,9 +2,9 @@ require_relative '../lib/module-cluster.rb'
2
2
 
3
3
  describe ModuleCluster do
4
4
 
5
- #############################
5
+ ############################
6
6
  # define_module_included #
7
- #############################
7
+ ############################
8
8
 
9
9
  it 'can define includes and extends for module inclusion' do
10
10
  module ModuleCluster::MockInclusion01
@@ -21,12 +21,19 @@ describe ModuleCluster do
21
21
  end
22
22
  end
23
23
  module ModuleCluster::MockInclusion01a
24
+ eigenclass = class << self ; self ; end
24
25
  ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
25
26
  ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
27
+ ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
28
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
29
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
30
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
26
31
  include ModuleCluster::MockInclusion01
27
32
  ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == true
28
33
  ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == true
29
- eigenclass = class << self ; self ; end
34
+ ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == false
35
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock1 ).should == false
36
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock2 ).should == false
30
37
  eigenclass.ancestors.include?( ModuleCluster::MockInclusion01::Mock3 ).should == true
31
38
  end
32
39
  module ModuleCluster::MockInclusion02
@@ -42,12 +49,19 @@ describe ModuleCluster do
42
49
  end
43
50
  end
44
51
  module ModuleCluster::MockInclusion02a
52
+ eigenclass = class << self ; self ; end
45
53
  ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == false
46
54
  ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
55
+ ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
56
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == false
57
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
58
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
47
59
  include ModuleCluster::MockInclusion02
48
60
  ancestors.include?( ModuleCluster::MockInclusion02::Mock1 ).should == true
49
61
  ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == true
50
- eigenclass = class << self ; self ; end
62
+ ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
63
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
64
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock2 ).should == false
51
65
  eigenclass.ancestors.include?( ModuleCluster::MockInclusion02::Mock3 ).should == false
52
66
  end
53
67
  module ModuleCluster::MockInclusion03
@@ -63,19 +77,26 @@ describe ModuleCluster do
63
77
  end
64
78
  end
65
79
  module ModuleCluster::MockInclusion03a
80
+ eigenclass = class << self ; self ; end
66
81
  ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
67
82
  ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
83
+ ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
84
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
85
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
86
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
68
87
  include ModuleCluster::MockInclusion03
69
88
  ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
70
89
  ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
71
- eigenclass = class << self ; self ; end
90
+ ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == false
91
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock1 ).should == false
92
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock2 ).should == false
72
93
  eigenclass.ancestors.include?( ModuleCluster::MockInclusion03::Mock3 ).should == true
73
94
  end
74
95
  end
75
96
 
76
- #############################
97
+ ############################
77
98
  # define_module_extended #
78
- #############################
99
+ ############################
79
100
 
80
101
  it 'can define includes and extends for module extension' do
81
102
  module ModuleCluster::MockExtension01
@@ -92,12 +113,19 @@ describe ModuleCluster do
92
113
  end
93
114
  end
94
115
  module ModuleCluster::MockExtension01a
116
+ eigenclass = class << self ; self ; end
95
117
  ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
96
118
  ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
119
+ ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
120
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
121
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
122
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
97
123
  extend ModuleCluster::MockExtension01
98
124
  ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == true
99
125
  ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == true
100
- eigenclass = class << self ; self ; end
126
+ ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == false
127
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock1 ).should == false
128
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock2 ).should == false
101
129
  eigenclass.ancestors.include?( ModuleCluster::MockExtension01::Mock3 ).should == true
102
130
  end
103
131
  module ModuleCluster::MockExtension02
@@ -113,12 +141,19 @@ describe ModuleCluster do
113
141
  end
114
142
  end
115
143
  module ModuleCluster::MockExtension02a
144
+ eigenclass = class << self ; self ; end
116
145
  ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
117
146
  ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
147
+ ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
148
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
149
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
150
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
118
151
  extend ModuleCluster::MockExtension02
119
152
  ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == true
120
153
  ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == true
121
- eigenclass = class << self ; self ; end
154
+ ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
155
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock1 ).should == false
156
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock2 ).should == false
122
157
  eigenclass.ancestors.include?( ModuleCluster::MockExtension02::Mock3 ).should == false
123
158
  end
124
159
  module ModuleCluster::MockExtension03
@@ -134,12 +169,19 @@ describe ModuleCluster do
134
169
  end
135
170
  end
136
171
  module ModuleCluster::MockExtension03a
172
+ eigenclass = class << self ; self ; end
137
173
  ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
138
174
  ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
175
+ ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
176
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
177
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
178
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
139
179
  extend ModuleCluster::MockExtension03
140
180
  ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
141
181
  ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
142
- eigenclass = class << self ; self ; end
182
+ ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == false
183
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock1 ).should == false
184
+ eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock2 ).should == false
143
185
  eigenclass.ancestors.include?( ModuleCluster::MockExtension03::Mock3 ).should == true
144
186
  end
145
187
  end
@@ -163,12 +205,19 @@ describe ModuleCluster do
163
205
  end
164
206
  end
165
207
  module ModuleCluster::MockClusterInclusion01a
208
+ eigenclass = class << self ; self ; end
166
209
  ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
167
210
  ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
211
+ ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
212
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
213
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
214
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
168
215
  include ModuleCluster::MockClusterInclusion01
169
216
  ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == true
170
217
  ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == true
171
- eigenclass = class << self ; self ; end
218
+ ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == false
219
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock1 ).should == false
220
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock2 ).should == false
172
221
  eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion01::Mock3 ).should == true
173
222
  end
174
223
  module ModuleCluster::MockClusterInclusion02
@@ -184,12 +233,16 @@ describe ModuleCluster do
184
233
  end
185
234
  end
186
235
  module ModuleCluster::MockClusterInclusion02a
236
+ eigenclass = class << self ; self ; end
187
237
  ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == false
188
238
  ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == false
239
+ ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
189
240
  include ModuleCluster::MockClusterInclusion02
190
241
  ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == true
191
242
  ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == true
192
- eigenclass = class << self ; self ; end
243
+ ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
244
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock1 ).should == false
245
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock2 ).should == false
193
246
  eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion02::Mock3 ).should == false
194
247
  end
195
248
  module ModuleCluster::MockClusterInclusion03
@@ -205,12 +258,16 @@ describe ModuleCluster do
205
258
  end
206
259
  end
207
260
  module ModuleCluster::MockClusterInclusion03a
261
+ eigenclass = class << self ; self ; end
208
262
  ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
209
263
  ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
264
+ ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == false
210
265
  include ModuleCluster::MockClusterInclusion03
211
266
  ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
212
267
  ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
213
- eigenclass = class << self ; self ; end
268
+ ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == false
269
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock1 ).should == false
270
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock2 ).should == false
214
271
  eigenclass.ancestors.include?( ModuleCluster::MockClusterInclusion03::Mock3 ).should == true
215
272
  end
216
273
  module ModuleCluster::MockClusterExtension01
@@ -227,12 +284,19 @@ describe ModuleCluster do
227
284
  end
228
285
  end
229
286
  module ModuleCluster::MockClusterExtension01a
287
+ eigenclass = class << self ; self ; end
230
288
  ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
231
289
  ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
290
+ ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
291
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
292
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
293
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
232
294
  extend ModuleCluster::MockClusterExtension01
233
295
  ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == true
234
296
  ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == true
235
- eigenclass = class << self ; self ; end
297
+ ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == false
298
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock1 ).should == false
299
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock2 ).should == false
236
300
  eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension01::Mock3 ).should == true
237
301
  end
238
302
  module ModuleCluster::MockClusterExtension02
@@ -248,12 +312,19 @@ describe ModuleCluster do
248
312
  end
249
313
  end
250
314
  module ModuleCluster::MockClusterExtension02a
315
+ eigenclass = class << self ; self ; end
251
316
  ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
252
317
  ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
318
+ ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
319
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
320
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
321
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
253
322
  extend ModuleCluster::MockClusterExtension02
254
323
  ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == true
255
324
  ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == true
256
- eigenclass = class << self ; self ; end
325
+ ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
326
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock1 ).should == false
327
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock2 ).should == false
257
328
  eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension02::Mock3 ).should == false
258
329
  end
259
330
  module ModuleCluster::MockClusterExtension03
@@ -269,15 +340,2217 @@ describe ModuleCluster do
269
340
  end
270
341
  end
271
342
  module ModuleCluster::MockClusterExtension03a
343
+ eigenclass = class << self ; self ; end
272
344
  ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
273
345
  ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
274
346
  ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
347
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
348
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
349
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
275
350
  extend ModuleCluster::MockClusterExtension03
276
351
  ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
277
352
  ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
278
- eigenclass = class << self ; self ; end
353
+ ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == false
354
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock1 ).should == false
355
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock2 ).should == false
279
356
  eigenclass.ancestors.include?( ModuleCluster::MockClusterExtension03::Mock3 ).should == true
280
357
  end
281
358
  end
282
359
 
360
+ #####################################
361
+ # define_module_included_cascades #
362
+ #####################################
363
+
364
+ it 'can define includes and extends for module inclusion' do
365
+ module ModuleCluster::MockInclusionCascades01
366
+ extend ModuleCluster
367
+ module Mock1
368
+ end
369
+ module Mock2
370
+ end
371
+ module Mock3
372
+ end
373
+ define_module_included_cascades do |includes, extends|
374
+ includes.concat [ Mock1, Mock2 ]
375
+ extends.concat [ Mock3 ]
376
+ end
377
+ end
378
+ module ModuleCluster::MockInclusionCascades01a
379
+ eigenclass = class << self ; self ; end
380
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
381
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
382
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
383
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
384
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
385
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
386
+ include ModuleCluster::MockInclusionCascades01
387
+ methods.include?( :included ).should == true
388
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
389
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
390
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
391
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
392
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
393
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == true
394
+ end
395
+ class ModuleCluster::MockInclusionCascades01ClassIncludes
396
+ eigenclass = class << self ; self ; end
397
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
398
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
399
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
400
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
401
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
402
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
403
+ include ModuleCluster::MockInclusionCascades01a
404
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
405
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
406
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
407
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
408
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
409
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == true
410
+ end
411
+ class ModuleCluster::MockInclusionCascades01ClassExtends
412
+ eigenclass = class << self ; self ; end
413
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
414
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
415
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
416
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
417
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
418
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
419
+ extend ModuleCluster::MockInclusionCascades01a
420
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == false
421
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == false
422
+ ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
423
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock1 ).should == true
424
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock2 ).should == true
425
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades01::Mock3 ).should == false
426
+ end
427
+ module ModuleCluster::MockInclusionCascades02
428
+ extend ModuleCluster
429
+ module Mock1
430
+ end
431
+ module Mock2
432
+ end
433
+ module Mock3
434
+ end
435
+ define_module_included_cascades do |includes, extends|
436
+ includes.concat [ Mock1, Mock2 ]
437
+ end
438
+ end
439
+ class ModuleCluster::MockInclusionCascades02ClassIncludes
440
+ eigenclass = class << self ; self ; end
441
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
442
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
443
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
444
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
445
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
446
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
447
+ include ModuleCluster::MockInclusionCascades02
448
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
449
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
450
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
451
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
452
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
453
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
454
+ end
455
+ class ModuleCluster::MockInclusionCascades02ClassExtends
456
+ eigenclass = class << self ; self ; end
457
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
458
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
459
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
460
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
461
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
462
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
463
+ extend ModuleCluster::MockInclusionCascades02
464
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
465
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
466
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
467
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
468
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
469
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
470
+ end
471
+ module ModuleCluster::MockInclusionCascades02a
472
+ eigenclass = class << self ; self ; end
473
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
474
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
475
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
476
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
477
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
478
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
479
+ include ModuleCluster::MockInclusionCascades02
480
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
481
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
482
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
483
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
484
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
485
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
486
+ end
487
+ class ModuleCluster::MockInclusionCascades02aClassIncludes
488
+ eigenclass = class << self ; self ; end
489
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
490
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
491
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
492
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
493
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
494
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
495
+ include ModuleCluster::MockInclusionCascades02a
496
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
497
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
498
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
499
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
500
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
501
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
502
+ end
503
+ class ModuleCluster::MockInclusionCascades02aClassExtends
504
+ eigenclass = class << self ; self ; end
505
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
506
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
507
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
508
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
509
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
510
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
511
+ extend ModuleCluster::MockInclusionCascades02a
512
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == false
513
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == false
514
+ ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
515
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock1 ).should == true
516
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock2 ).should == true
517
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades02::Mock3 ).should == false
518
+ end
519
+ module ModuleCluster::MockInclusionCascades03
520
+ extend ModuleCluster
521
+ module Mock1
522
+ end
523
+ module Mock2
524
+ end
525
+ module Mock3
526
+ end
527
+ define_module_included_cascades do |includes, extends|
528
+ extends.concat [ Mock3 ]
529
+ end
530
+ end
531
+ class ModuleCluster::MockInclusionCascades03ClassIncludes
532
+ eigenclass = class << self ; self ; end
533
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
534
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
535
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
536
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
537
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
538
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
539
+ include ModuleCluster::MockInclusionCascades03
540
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
541
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
542
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
543
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
544
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
545
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
546
+ end
547
+ class ModuleCluster::MockInclusionCascades03ClassExtends
548
+ eigenclass = class << self ; self ; end
549
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
550
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
551
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
552
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
553
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
554
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
555
+ extend ModuleCluster::MockInclusionCascades03
556
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
557
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
558
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
559
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
560
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
561
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
562
+ end
563
+ module ModuleCluster::MockInclusionCascades03a
564
+ eigenclass = class << self ; self ; end
565
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
566
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
567
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
568
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
569
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
570
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
571
+ include ModuleCluster::MockInclusionCascades03
572
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
573
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
574
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
575
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
576
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
577
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
578
+ end
579
+ class ModuleCluster::MockInclusionCascades03aClassIncludes
580
+ eigenclass = class << self ; self ; end
581
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
582
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
583
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
584
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
585
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
586
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
587
+ include ModuleCluster::MockInclusionCascades03a
588
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
589
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
590
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
591
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
592
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
593
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == true
594
+ end
595
+ class ModuleCluster::MockInclusionCascades03aClassExtends
596
+ eigenclass = class << self ; self ; end
597
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
598
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
599
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
600
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
601
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
602
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
603
+ extend ModuleCluster::MockInclusionCascades03a
604
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
605
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
606
+ ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
607
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock1 ).should == false
608
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock2 ).should == false
609
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascades03::Mock3 ).should == false
610
+ end
611
+ end
612
+
613
+ #####################################
614
+ # define_module_extended_cascades #
615
+ #####################################
616
+
617
+ it 'can define includes and extends for module extension' do
618
+ module ModuleCluster::MockExtensionCascades01
619
+ extend ModuleCluster
620
+ module Mock1
621
+ end
622
+ module Mock2
623
+ end
624
+ module Mock3
625
+ end
626
+ define_module_extended_cascades do |includes, extends|
627
+ includes.concat [ Mock1, Mock2 ]
628
+ extends.concat [ Mock3 ]
629
+ end
630
+ end
631
+ class ModuleCluster::MockExtensionCascades01ClassIncludes
632
+ eigenclass = class << self ; self ; end
633
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
634
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
635
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
636
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
637
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
638
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
639
+ include ModuleCluster::MockExtensionCascades01
640
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
641
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
642
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
643
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
644
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
645
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
646
+ end
647
+ class ModuleCluster::MockExtensionCascades01ClassExtends
648
+ eigenclass = class << self ; self ; end
649
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
650
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
651
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
652
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
653
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
654
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
655
+ extend ModuleCluster::MockExtensionCascades01
656
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
657
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
658
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
659
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
660
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
661
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
662
+ end
663
+ module ModuleCluster::MockExtensionCascades01a
664
+ eigenclass = class << self ; self ; end
665
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
666
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
667
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
668
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
669
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
670
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
671
+ extend ModuleCluster::MockExtensionCascades01
672
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
673
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
674
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
675
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
676
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
677
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
678
+ end
679
+ class ModuleCluster::MockExtensionCascades01aClassIncludes
680
+ eigenclass = class << self ; self ; end
681
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
682
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
683
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
684
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
685
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
686
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
687
+ include ModuleCluster::MockExtensionCascades01a
688
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
689
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
690
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
691
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
692
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
693
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
694
+ end
695
+ class ModuleCluster::MockExtensionCascades01aClassExtends
696
+ eigenclass = class << self ; self ; end
697
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
698
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
699
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
700
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == false
701
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == false
702
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
703
+ extend ModuleCluster::MockExtensionCascades01a
704
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
705
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
706
+ ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == false
707
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock1 ).should == true
708
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock2 ).should == true
709
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades01::Mock3 ).should == true
710
+ end
711
+ module ModuleCluster::MockExtensionCascades02
712
+ extend ModuleCluster
713
+ module Mock1
714
+ end
715
+ module Mock2
716
+ end
717
+ module Mock3
718
+ end
719
+ define_module_extended_cascades do |includes, extends|
720
+ includes.concat [ Mock1, Mock2 ]
721
+ end
722
+ end
723
+ class ModuleCluster::MockExtensionCascades02ClassIncludes
724
+ eigenclass = class << self ; self ; end
725
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
726
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
727
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
728
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
729
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
730
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
731
+ include ModuleCluster::MockExtensionCascades02
732
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
733
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
734
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
735
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
736
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
737
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
738
+ end
739
+ class ModuleCluster::MockExtensionCascades02ClassExtends
740
+ eigenclass = class << self ; self ; end
741
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
742
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
743
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
744
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
745
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
746
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
747
+ extend ModuleCluster::MockExtensionCascades02
748
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
749
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
750
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
751
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
752
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
753
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
754
+ end
755
+ module ModuleCluster::MockExtensionCascades02a
756
+ eigenclass = class << self ; self ; end
757
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
758
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
759
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
760
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
761
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
762
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
763
+ extend ModuleCluster::MockExtensionCascades02
764
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
765
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
766
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
767
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
768
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
769
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
770
+ end
771
+ class ModuleCluster::MockExtensionCascades02aClassIncludes
772
+ eigenclass = class << self ; self ; end
773
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
774
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
775
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
776
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
777
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
778
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
779
+ include ModuleCluster::MockExtensionCascades02a
780
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
781
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
782
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
783
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
784
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
785
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
786
+ end
787
+ class ModuleCluster::MockExtensionCascades02aClassExtends
788
+ eigenclass = class << self ; self ; end
789
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
790
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
791
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
792
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == false
793
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == false
794
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
795
+ extend ModuleCluster::MockExtensionCascades02a
796
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
797
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
798
+ ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
799
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock1 ).should == true
800
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock2 ).should == true
801
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades02::Mock3 ).should == false
802
+ end
803
+ module ModuleCluster::MockExtensionCascades03
804
+ extend ModuleCluster
805
+ module Mock1
806
+ end
807
+ module Mock2
808
+ end
809
+ module Mock3
810
+ end
811
+ define_module_extended_cascades do |includes, extends|
812
+ extends.concat [ Mock3 ]
813
+ end
814
+ end
815
+ class ModuleCluster::MockExtensionCascades03ClassIncludes
816
+ eigenclass = class << self ; self ; end
817
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
818
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
819
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
820
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
821
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
822
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
823
+ include ModuleCluster::MockExtensionCascades03
824
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
825
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
826
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
827
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
828
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
829
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
830
+ end
831
+ class ModuleCluster::MockExtensionCascades03ClassExtends
832
+ eigenclass = class << self ; self ; end
833
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
834
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
835
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
836
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
837
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
838
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
839
+ extend ModuleCluster::MockExtensionCascades03
840
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
841
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
842
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
843
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
844
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
845
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
846
+ end
847
+ module ModuleCluster::MockExtensionCascades03a
848
+ eigenclass = class << self ; self ; end
849
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
850
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
851
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
852
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
853
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
854
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
855
+ extend ModuleCluster::MockExtensionCascades03
856
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
857
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
858
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
859
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
860
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
861
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
862
+ end
863
+ class ModuleCluster::MockExtensionCascades03aClassIncludes
864
+ eigenclass = class << self ; self ; end
865
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
866
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
867
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
868
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
869
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
870
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
871
+ include ModuleCluster::MockExtensionCascades03a
872
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
873
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
874
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
875
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
876
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
877
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
878
+ end
879
+ class ModuleCluster::MockExtensionCascades03aClassExtends
880
+ eigenclass = class << self ; self ; end
881
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
882
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
883
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
884
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
885
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
886
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
887
+ extend ModuleCluster::MockExtensionCascades03a
888
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
889
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
890
+ ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == false
891
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock1 ).should == false
892
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock2 ).should == false
893
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascades03::Mock3 ).should == true
894
+ end
895
+ end
896
+
897
+ ####################################
898
+ # define_module_cluster_cascades #
899
+ ####################################
900
+
901
+ it 'can define includes and extends for module extension and inclusion' do
902
+ module ModuleCluster::MockClusterCascadesInclusion01
903
+ extend ModuleCluster
904
+ module Mock1
905
+ end
906
+ module Mock2
907
+ end
908
+ module Mock3
909
+ end
910
+ define_module_cluster_cascades do |includes, extends|
911
+ includes.concat [ Mock1, Mock2 ]
912
+ extends.concat [ Mock3 ]
913
+ end
914
+ end
915
+ class ModuleCluster::MockClusterCascadesInclusion01ClassIncludes
916
+ eigenclass = class << self ; self ; end
917
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
918
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
919
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
920
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
921
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
922
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
923
+ include ModuleCluster::MockClusterCascadesInclusion01
924
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
925
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
926
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
927
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
928
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
929
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
930
+ end
931
+ class ModuleCluster::MockClusterCascadesInclusion01ClassExtends
932
+ eigenclass = class << self ; self ; end
933
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
934
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
935
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
936
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
937
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
938
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
939
+ extend ModuleCluster::MockClusterCascadesInclusion01
940
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
941
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
942
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
943
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
944
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
945
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
946
+ end
947
+ module ModuleCluster::MockClusterCascadesInclusion01a
948
+ eigenclass = class << self ; self ; end
949
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
950
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
951
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
952
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
953
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
954
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
955
+ include ModuleCluster::MockClusterCascadesInclusion01
956
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
957
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
958
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
959
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
960
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
961
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
962
+ end
963
+ class ModuleCluster::MockClusterCascadesInclusion01aClassIncludes
964
+ eigenclass = class << self ; self ; end
965
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
966
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
967
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
968
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
969
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
970
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
971
+ include ModuleCluster::MockClusterCascadesInclusion01a
972
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
973
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
974
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
975
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
976
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
977
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
978
+ end
979
+ class ModuleCluster::MockClusterCascadesInclusion01aClassExtends
980
+ eigenclass = class << self ; self ; end
981
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
982
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
983
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
984
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == false
985
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == false
986
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
987
+ extend ModuleCluster::MockClusterCascadesInclusion01a
988
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
989
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
990
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == false
991
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock1 ).should == true
992
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock2 ).should == true
993
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion01::Mock3 ).should == true
994
+ end
995
+ module ModuleCluster::MockClusterCascadesInclusion02
996
+ extend ModuleCluster
997
+ module Mock1
998
+ end
999
+ module Mock2
1000
+ end
1001
+ module Mock3
1002
+ end
1003
+ define_module_cluster_cascades do |includes, extends|
1004
+ includes.concat [ Mock1, Mock2 ]
1005
+ end
1006
+ end
1007
+ class ModuleCluster::MockClusterCascadesInclusion02Includes
1008
+ eigenclass = class << self ; self ; end
1009
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1010
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1011
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1012
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1013
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1014
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1015
+ include ModuleCluster::MockClusterCascadesInclusion02
1016
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1017
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1018
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1019
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1020
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1021
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1022
+ end
1023
+ class ModuleCluster::MockClusterCascadesInclusion02Extends
1024
+ eigenclass = class << self ; self ; end
1025
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1026
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1027
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1028
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1029
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1030
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1031
+ extend ModuleCluster::MockClusterCascadesInclusion02
1032
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1033
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1034
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1035
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1036
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1037
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1038
+ end
1039
+ module ModuleCluster::MockClusterCascadesInclusion02a
1040
+ eigenclass = class << self ; self ; end
1041
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1042
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1043
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1044
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1045
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1046
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1047
+ include ModuleCluster::MockClusterCascadesInclusion02
1048
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1049
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1050
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1051
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1052
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1053
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1054
+ end
1055
+ class ModuleCluster::MockClusterCascadesInclusion02aClassIncludes
1056
+ eigenclass = class << self ; self ; end
1057
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1058
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1059
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1060
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1061
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1062
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1063
+ include ModuleCluster::MockClusterCascadesInclusion02a
1064
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1065
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1066
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1067
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1068
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1069
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1070
+ end
1071
+ class ModuleCluster::MockClusterCascadesInclusion02aClassExtends
1072
+ eigenclass = class << self ; self ; end
1073
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1074
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1075
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1076
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == false
1077
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == false
1078
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1079
+ extend ModuleCluster::MockClusterCascadesInclusion02a
1080
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1081
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1082
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1083
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock1 ).should == true
1084
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock2 ).should == true
1085
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion02::Mock3 ).should == false
1086
+ end
1087
+ module ModuleCluster::MockClusterCascadesInclusion03
1088
+ extend ModuleCluster
1089
+ module Mock1
1090
+ end
1091
+ module Mock2
1092
+ end
1093
+ module Mock3
1094
+ end
1095
+ define_module_cluster_cascades do |includes, extends|
1096
+ extends.concat [ Mock3 ]
1097
+ end
1098
+ end
1099
+ class ModuleCluster::MockClusterCascadesInclusion03ClassIncludes
1100
+ eigenclass = class << self ; self ; end
1101
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1102
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1103
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1104
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1105
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1106
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1107
+ include ModuleCluster::MockClusterCascadesInclusion03
1108
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1109
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1110
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1111
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1112
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1113
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1114
+ end
1115
+ class ModuleCluster::MockClusterCascadesInclusion03ClassExtends
1116
+ eigenclass = class << self ; self ; end
1117
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1118
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1119
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1120
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1121
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1122
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1123
+ extend ModuleCluster::MockClusterCascadesInclusion03
1124
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1125
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1126
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1127
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1128
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1129
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1130
+ end
1131
+ module ModuleCluster::MockClusterCascadesInclusion03a
1132
+ eigenclass = class << self ; self ; end
1133
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1134
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1135
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1136
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1137
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1138
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1139
+ include ModuleCluster::MockClusterCascadesInclusion03
1140
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1141
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1142
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1143
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1144
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1145
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1146
+ end
1147
+ class ModuleCluster::MockClusterCascadesInclusion03aClassInclude
1148
+ eigenclass = class << self ; self ; end
1149
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1150
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1151
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1152
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1153
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1154
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1155
+ include ModuleCluster::MockClusterCascadesInclusion03a
1156
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1157
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1158
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1159
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1160
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1161
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1162
+ end
1163
+ class ModuleCluster::MockClusterCascadesInclusion03aClassExtends
1164
+ eigenclass = class << self ; self ; end
1165
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1166
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1167
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1168
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1169
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1170
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1171
+ extend ModuleCluster::MockClusterCascadesInclusion03a
1172
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1173
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1174
+ ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == false
1175
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock1 ).should == false
1176
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock2 ).should == false
1177
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesInclusion03::Mock3 ).should == true
1178
+ end
1179
+ module ModuleCluster::MockClusterCascadesExtension01
1180
+ extend ModuleCluster
1181
+ module Mock1
1182
+ end
1183
+ module Mock2
1184
+ end
1185
+ module Mock3
1186
+ end
1187
+ define_module_cluster_cascades do |includes, extends|
1188
+ includes.concat [ Mock1, Mock2 ]
1189
+ extends.concat [ Mock3 ]
1190
+ end
1191
+ end
1192
+ class ModuleCluster::MockClusterCascadesExtension01ClassIncludes
1193
+ eigenclass = class << self ; self ; end
1194
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1195
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1196
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1197
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1198
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1199
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1200
+ include ModuleCluster::MockClusterCascadesExtension01
1201
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1202
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1203
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1204
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1205
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1206
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1207
+ end
1208
+ class ModuleCluster::MockClusterCascadesExtension01ClassExtends
1209
+ eigenclass = class << self ; self ; end
1210
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1211
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1212
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1213
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1214
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1215
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1216
+ extend ModuleCluster::MockClusterCascadesExtension01
1217
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1218
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1219
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1220
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1221
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1222
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1223
+ end
1224
+ module ModuleCluster::MockClusterCascadesExtension01a
1225
+ eigenclass = class << self ; self ; end
1226
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1227
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1228
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1229
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1230
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1231
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1232
+ extend ModuleCluster::MockClusterCascadesExtension01
1233
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1234
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1235
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1236
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1237
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1238
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1239
+ end
1240
+ class ModuleCluster::MockClusterCascadesExtension01aClassIncludes
1241
+ eigenclass = class << self ; self ; end
1242
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1243
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1244
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1245
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1246
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1247
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1248
+ include ModuleCluster::MockClusterCascadesExtension01a
1249
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1250
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1251
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1252
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1253
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1254
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1255
+ end
1256
+ class ModuleCluster::MockClusterCascadesExtension01aClassExtends
1257
+ eigenclass = class << self ; self ; end
1258
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1259
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1260
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1261
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == false
1262
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == false
1263
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1264
+ extend ModuleCluster::MockClusterCascadesExtension01a
1265
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1266
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1267
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == false
1268
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock1 ).should == true
1269
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock2 ).should == true
1270
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension01::Mock3 ).should == true
1271
+ end
1272
+ module ModuleCluster::MockClusterCascadesExtension02
1273
+ extend ModuleCluster
1274
+ module Mock1
1275
+ end
1276
+ module Mock2
1277
+ end
1278
+ module Mock3
1279
+ end
1280
+ define_module_cluster_cascades do |includes, extends|
1281
+ includes.concat [ Mock1, Mock2 ]
1282
+ end
1283
+ end
1284
+ class ModuleCluster::MockClusterCascadesExtension02ClassIncludes
1285
+ eigenclass = class << self ; self ; end
1286
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1287
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1288
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1289
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1290
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1291
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1292
+ include ModuleCluster::MockClusterCascadesExtension02
1293
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1294
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1295
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1296
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1297
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1298
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1299
+ end
1300
+ class ModuleCluster::MockClusterCascadesExtension02ClassExtends
1301
+ eigenclass = class << self ; self ; end
1302
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1303
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1304
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1305
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1306
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1307
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1308
+ extend ModuleCluster::MockClusterCascadesExtension02
1309
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1310
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1311
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1312
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1313
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1314
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1315
+ end
1316
+ module ModuleCluster::MockClusterCascadesExtension02a
1317
+ eigenclass = class << self ; self ; end
1318
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1319
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1320
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1321
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1322
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1323
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1324
+ extend ModuleCluster::MockClusterCascadesExtension02
1325
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1326
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1327
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1328
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1329
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1330
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1331
+ end
1332
+ class ModuleCluster::MockClusterCascadesExtension02aClassIncludes
1333
+ eigenclass = class << self ; self ; end
1334
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1335
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1336
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1337
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1338
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1339
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1340
+ include ModuleCluster::MockClusterCascadesExtension02a
1341
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1342
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1343
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1344
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1345
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1346
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1347
+ end
1348
+ class ModuleCluster::MockClusterCascadesExtension02aClassExtends
1349
+ eigenclass = class << self ; self ; end
1350
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1351
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1352
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1353
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == false
1354
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == false
1355
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1356
+ extend ModuleCluster::MockClusterCascadesExtension02a
1357
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1358
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1359
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1360
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock1 ).should == true
1361
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock2 ).should == true
1362
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension02::Mock3 ).should == false
1363
+ end
1364
+ module ModuleCluster::MockClusterCascadesExtension03
1365
+ extend ModuleCluster
1366
+ module Mock1
1367
+ end
1368
+ module Mock2
1369
+ end
1370
+ module Mock3
1371
+ end
1372
+ define_module_cluster_cascades do |includes, extends|
1373
+ extends.concat [ Mock3 ]
1374
+ end
1375
+ end
1376
+ class ModuleCluster::MockClusterCascadesExtension03ClassIncludes
1377
+ eigenclass = class << self ; self ; end
1378
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1379
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1380
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1381
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1382
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1383
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1384
+ include ModuleCluster::MockClusterCascadesExtension03
1385
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1386
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1387
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1388
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1389
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1390
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1391
+ end
1392
+ class ModuleCluster::MockClusterCascadesExtension03ClassExtends
1393
+ eigenclass = class << self ; self ; end
1394
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1395
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1396
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1397
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1398
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1399
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1400
+ extend ModuleCluster::MockClusterCascadesExtension03
1401
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1402
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1403
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1404
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1405
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1406
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1407
+ end
1408
+ module ModuleCluster::MockClusterCascadesExtension03a
1409
+ eigenclass = class << self ; self ; end
1410
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1411
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1412
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1413
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1414
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1415
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1416
+ extend ModuleCluster::MockClusterCascadesExtension03
1417
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1418
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1419
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1420
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1421
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1422
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1423
+ end
1424
+ class ModuleCluster::MockClusterCascadesExtension03aClassIncludes
1425
+ eigenclass = class << self ; self ; end
1426
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1427
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1428
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1429
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1430
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1431
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1432
+ include ModuleCluster::MockClusterCascadesExtension03a
1433
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1434
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1435
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1436
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1437
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1438
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1439
+ end
1440
+ class ModuleCluster::MockClusterCascadesExtension03aClassExtends
1441
+ eigenclass = class << self ; self ; end
1442
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1443
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1444
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1445
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1446
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1447
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1448
+ extend ModuleCluster::MockClusterCascadesExtension03a
1449
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1450
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1451
+ ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == false
1452
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock1 ).should == false
1453
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock2 ).should == false
1454
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterCascadesExtension03::Mock3 ).should == true
1455
+ end
1456
+ end
1457
+
1458
+ ##############################################
1459
+ # define_module_included_cascades_to_class #
1460
+ ##############################################
1461
+
1462
+ it 'can define includes and extends for module inclusion' do
1463
+ module ModuleCluster::MockInclusionCascadesToClass01
1464
+ extend ModuleCluster
1465
+ module Mock1
1466
+ end
1467
+ module Mock2
1468
+ end
1469
+ module Mock3
1470
+ end
1471
+ define_module_included_cascades_to_class do |includes, extends|
1472
+ includes.concat [ Mock1, Mock2 ]
1473
+ extends.concat [ Mock3 ]
1474
+ end
1475
+ end
1476
+ module ModuleCluster::MockInclusionCascadesToClass01a
1477
+ eigenclass = class << self ; self ; end
1478
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1479
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1480
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1481
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1482
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1483
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1484
+ include ModuleCluster::MockInclusionCascadesToClass01
1485
+ methods.include?( :included ).should == true
1486
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1487
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1488
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1489
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1490
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1491
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1492
+ end
1493
+ class ModuleCluster::MockInclusionCascadesToClass01ClassIncludes
1494
+ eigenclass = class << self ; self ; end
1495
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1496
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1497
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1498
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1499
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1500
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1501
+ include ModuleCluster::MockInclusionCascadesToClass01a
1502
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == true
1503
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == true
1504
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1505
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1506
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1507
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == true
1508
+ end
1509
+ class ModuleCluster::MockInclusionCascadesToClass01ClassExtends
1510
+ eigenclass = class << self ; self ; end
1511
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1512
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1513
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1514
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1515
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1516
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1517
+ extend ModuleCluster::MockInclusionCascadesToClass01a
1518
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1519
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1520
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1521
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock1 ).should == false
1522
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock2 ).should == false
1523
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass01::Mock3 ).should == false
1524
+ end
1525
+ module ModuleCluster::MockInclusionCascadesToClass02
1526
+ extend ModuleCluster
1527
+ module Mock1
1528
+ end
1529
+ module Mock2
1530
+ end
1531
+ module Mock3
1532
+ end
1533
+ define_module_included_cascades_to_class do |includes, extends|
1534
+ includes.concat [ Mock1, Mock2 ]
1535
+ end
1536
+ end
1537
+ class ModuleCluster::MockInclusionCascadesToClass02ClassIncludes
1538
+ eigenclass = class << self ; self ; end
1539
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1540
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1541
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1542
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1543
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1544
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1545
+ include ModuleCluster::MockInclusionCascadesToClass02
1546
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == true
1547
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == true
1548
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1549
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1550
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1551
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1552
+ end
1553
+ class ModuleCluster::MockInclusionCascadesToClass02ClassExtends
1554
+ eigenclass = class << self ; self ; end
1555
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1556
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1557
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1558
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1559
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1560
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1561
+ extend ModuleCluster::MockInclusionCascadesToClass02
1562
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1563
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1564
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1565
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1566
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1567
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1568
+ end
1569
+ module ModuleCluster::MockInclusionCascadesToClass02a
1570
+ eigenclass = class << self ; self ; end
1571
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1572
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1573
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1574
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1575
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1576
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1577
+ include ModuleCluster::MockInclusionCascadesToClass02
1578
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1579
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1580
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1581
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1582
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1583
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1584
+ end
1585
+ class ModuleCluster::MockInclusionCascadesToClass02aClassIncludes
1586
+ eigenclass = class << self ; self ; end
1587
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1588
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1589
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1590
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1591
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1592
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1593
+ include ModuleCluster::MockInclusionCascadesToClass02a
1594
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == true
1595
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == true
1596
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1597
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1598
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1599
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1600
+ end
1601
+ class ModuleCluster::MockInclusionCascadesToClass02aClassExtends
1602
+ eigenclass = class << self ; self ; end
1603
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1604
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1605
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1606
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1607
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1608
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1609
+ extend ModuleCluster::MockInclusionCascadesToClass02a
1610
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1611
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1612
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1613
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock1 ).should == false
1614
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock2 ).should == false
1615
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass02::Mock3 ).should == false
1616
+ end
1617
+ module ModuleCluster::MockInclusionCascadesToClass03
1618
+ extend ModuleCluster
1619
+ module Mock1
1620
+ end
1621
+ module Mock2
1622
+ end
1623
+ module Mock3
1624
+ end
1625
+ define_module_included_cascades_to_class do |includes, extends|
1626
+ extends.concat [ Mock3 ]
1627
+ end
1628
+ end
1629
+ class ModuleCluster::MockInclusionCascadesToClass03ClassIncludes
1630
+ eigenclass = class << self ; self ; end
1631
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1632
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1633
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1634
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1635
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1636
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1637
+ include ModuleCluster::MockInclusionCascadesToClass03
1638
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1639
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1640
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1641
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1642
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1643
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == true
1644
+ end
1645
+ class ModuleCluster::MockInclusionCascadesToClass03ClassExtends
1646
+ eigenclass = class << self ; self ; end
1647
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1648
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1649
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1650
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1651
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1652
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1653
+ extend ModuleCluster::MockInclusionCascadesToClass03
1654
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1655
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1656
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1657
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1658
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1659
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1660
+ end
1661
+ module ModuleCluster::MockInclusionCascadesToClass03a
1662
+ eigenclass = class << self ; self ; end
1663
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1664
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1665
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1666
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1667
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1668
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1669
+ include ModuleCluster::MockInclusionCascadesToClass03
1670
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1671
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1672
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1673
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1674
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1675
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1676
+ end
1677
+ class ModuleCluster::MockInclusionCascadesToClass03aClassIncludes
1678
+ eigenclass = class << self ; self ; end
1679
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1680
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1681
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1682
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1683
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1684
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1685
+ include ModuleCluster::MockInclusionCascadesToClass03a
1686
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1687
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1688
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1689
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1690
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1691
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == true
1692
+ end
1693
+ class ModuleCluster::MockInclusionCascadesToClass03aClassExtends
1694
+ eigenclass = class << self ; self ; end
1695
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1696
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1697
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1698
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1699
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1700
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1701
+ extend ModuleCluster::MockInclusionCascadesToClass03a
1702
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1703
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1704
+ ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1705
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock1 ).should == false
1706
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock2 ).should == false
1707
+ eigenclass.ancestors.include?( ModuleCluster::MockInclusionCascadesToClass03::Mock3 ).should == false
1708
+ end
1709
+ end
1710
+
1711
+ ##############################################
1712
+ # define_module_extended_cascades_to_class #
1713
+ ##############################################
1714
+
1715
+ it 'can define includes and extends for module extension' do
1716
+ module ModuleCluster::MockExtensionCascadesToClass01
1717
+ extend ModuleCluster
1718
+ module Mock1
1719
+ end
1720
+ module Mock2
1721
+ end
1722
+ module Mock3
1723
+ end
1724
+ define_module_extended_cascades_to_class do |includes, extends|
1725
+ includes.concat [ Mock1, Mock2 ]
1726
+ extends.concat [ Mock3 ]
1727
+ end
1728
+ end
1729
+ class ModuleCluster::MockExtensionCascadesToClass01ClassIncludes
1730
+ eigenclass = class << self ; self ; end
1731
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1732
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1733
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1734
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1735
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1736
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1737
+ include ModuleCluster::MockExtensionCascadesToClass01
1738
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1739
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1740
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1741
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1742
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1743
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1744
+ end
1745
+ class ModuleCluster::MockExtensionCascadesToClass01ClassExtends
1746
+ eigenclass = class << self ; self ; end
1747
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1748
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1749
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1750
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1751
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1752
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1753
+ extend ModuleCluster::MockExtensionCascadesToClass01
1754
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == true
1755
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == true
1756
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1757
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1758
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1759
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == true
1760
+ end
1761
+ module ModuleCluster::MockExtensionCascadesToClass01a
1762
+ eigenclass = class << self ; self ; end
1763
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1764
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1765
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1766
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1767
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1768
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1769
+ extend ModuleCluster::MockExtensionCascadesToClass01
1770
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1771
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1772
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1773
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1774
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1775
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1776
+ end
1777
+ class ModuleCluster::MockExtensionCascadesToClass01aClassIncludes
1778
+ eigenclass = class << self ; self ; end
1779
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1780
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1781
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1782
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1783
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1784
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1785
+ include ModuleCluster::MockExtensionCascadesToClass01a
1786
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1787
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1788
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1789
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1790
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1791
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1792
+ end
1793
+ class ModuleCluster::MockExtensionCascadesToClass01aClassExtends
1794
+ eigenclass = class << self ; self ; end
1795
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1796
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1797
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1798
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1799
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1800
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1801
+ extend ModuleCluster::MockExtensionCascadesToClass01a
1802
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == true
1803
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == true
1804
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == false
1805
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock1 ).should == false
1806
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock2 ).should == false
1807
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass01::Mock3 ).should == true
1808
+ end
1809
+ module ModuleCluster::MockExtensionCascadesToClass02
1810
+ extend ModuleCluster
1811
+ module Mock1
1812
+ end
1813
+ module Mock2
1814
+ end
1815
+ module Mock3
1816
+ end
1817
+ define_module_extended_cascades_to_class do |includes, extends|
1818
+ includes.concat [ Mock1, Mock2 ]
1819
+ end
1820
+ end
1821
+ class ModuleCluster::MockExtensionCascadesToClass02ClassIncludes
1822
+ eigenclass = class << self ; self ; end
1823
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1824
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1825
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1826
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1827
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1828
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1829
+ include ModuleCluster::MockExtensionCascadesToClass02
1830
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1831
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1832
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1833
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1834
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1835
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1836
+ end
1837
+ class ModuleCluster::MockExtensionCascadesToClass02ClassExtends
1838
+ eigenclass = class << self ; self ; end
1839
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1840
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1841
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1842
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1843
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1844
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1845
+ extend ModuleCluster::MockExtensionCascadesToClass02
1846
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == true
1847
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == true
1848
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1849
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1850
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1851
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1852
+ end
1853
+ module ModuleCluster::MockExtensionCascadesToClass02a
1854
+ eigenclass = class << self ; self ; end
1855
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1856
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1857
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1858
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1859
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1860
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1861
+ extend ModuleCluster::MockExtensionCascadesToClass02
1862
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1863
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1864
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1865
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1866
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1867
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1868
+ end
1869
+ class ModuleCluster::MockExtensionCascadesToClass02aClassIncludes
1870
+ eigenclass = class << self ; self ; end
1871
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1872
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1873
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1874
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1875
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1876
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1877
+ include ModuleCluster::MockExtensionCascadesToClass02a
1878
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1879
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1880
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1881
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1882
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1883
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1884
+ end
1885
+ class ModuleCluster::MockExtensionCascadesToClass02aClassExtends
1886
+ eigenclass = class << self ; self ; end
1887
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1888
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1889
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1890
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1891
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1892
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1893
+ extend ModuleCluster::MockExtensionCascadesToClass02a
1894
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == true
1895
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == true
1896
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1897
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock1 ).should == false
1898
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock2 ).should == false
1899
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass02::Mock3 ).should == false
1900
+ end
1901
+ module ModuleCluster::MockExtensionCascadesToClass03
1902
+ extend ModuleCluster
1903
+ module Mock1
1904
+ end
1905
+ module Mock2
1906
+ end
1907
+ module Mock3
1908
+ end
1909
+ define_module_extended_cascades_to_class do |includes, extends|
1910
+ extends.concat [ Mock3 ]
1911
+ end
1912
+ end
1913
+ class ModuleCluster::MockExtensionCascadesToClass03ClassIncludes
1914
+ eigenclass = class << self ; self ; end
1915
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1916
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1917
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1918
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1919
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1920
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1921
+ include ModuleCluster::MockExtensionCascadesToClass03
1922
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1923
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1924
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1925
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1926
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1927
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1928
+ end
1929
+ class ModuleCluster::MockExtensionCascadesToClass03ClassExtends
1930
+ eigenclass = class << self ; self ; end
1931
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1932
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1933
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1934
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1935
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1936
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1937
+ extend ModuleCluster::MockExtensionCascadesToClass03
1938
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1939
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1940
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1941
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1942
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1943
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == true
1944
+ end
1945
+ module ModuleCluster::MockExtensionCascadesToClass03a
1946
+ eigenclass = class << self ; self ; end
1947
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1948
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1949
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1950
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1951
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1952
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1953
+ extend ModuleCluster::MockExtensionCascadesToClass03
1954
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1955
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1956
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1957
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1958
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1959
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1960
+ end
1961
+ class ModuleCluster::MockExtensionCascadesToClass03aClassIncludes
1962
+ eigenclass = class << self ; self ; end
1963
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1964
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1965
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1966
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1967
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1968
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1969
+ include ModuleCluster::MockExtensionCascadesToClass03a
1970
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1971
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1972
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1973
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1974
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1975
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1976
+ end
1977
+ class ModuleCluster::MockExtensionCascadesToClass03aClassExtends
1978
+ eigenclass = class << self ; self ; end
1979
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1980
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1981
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1982
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1983
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1984
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1985
+ extend ModuleCluster::MockExtensionCascadesToClass03a
1986
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1987
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1988
+ ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == false
1989
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock1 ).should == false
1990
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock2 ).should == false
1991
+ eigenclass.ancestors.include?( ModuleCluster::MockExtensionCascadesToClass03::Mock3 ).should == true
1992
+ end
1993
+ end
1994
+
1995
+ #############################################
1996
+ # define_module_cluster_cascades_to_class #
1997
+ #############################################
1998
+
1999
+ it 'can define includes and extends for module extension and inclusion' do
2000
+ module ModuleCluster::MockClusterClassCascadesInclusion01
2001
+ extend ModuleCluster
2002
+ module Mock1
2003
+ end
2004
+ module Mock2
2005
+ end
2006
+ module Mock3
2007
+ end
2008
+ define_module_cluster_cascades_to_class do |includes, extends|
2009
+ includes.concat [ Mock1, Mock2 ]
2010
+ extends.concat [ Mock3 ]
2011
+ end
2012
+ end
2013
+ class ModuleCluster::MockClusterClassCascadesInclusion01ClassIncludes
2014
+ eigenclass = class << self ; self ; end
2015
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2016
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2017
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2018
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2019
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2020
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2021
+ include ModuleCluster::MockClusterClassCascadesInclusion01
2022
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2023
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2024
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2025
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2026
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2027
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2028
+ end
2029
+ class ModuleCluster::MockClusterClassCascadesInclusion01ClassExtends
2030
+ eigenclass = class << self ; self ; end
2031
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2032
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2033
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2034
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2035
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2036
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2037
+ extend ModuleCluster::MockClusterClassCascadesInclusion01
2038
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2039
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2040
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2041
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2042
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2043
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2044
+ end
2045
+ module ModuleCluster::MockClusterClassCascadesInclusion01a
2046
+ eigenclass = class << self ; self ; end
2047
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2048
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2049
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2050
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2051
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2052
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2053
+ include ModuleCluster::MockClusterClassCascadesInclusion01
2054
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2055
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2056
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2057
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2058
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2059
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2060
+ end
2061
+ class ModuleCluster::MockClusterClassCascadesInclusion01aClassIncludes
2062
+ eigenclass = class << self ; self ; end
2063
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2064
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2065
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2066
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2067
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2068
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2069
+ include ModuleCluster::MockClusterClassCascadesInclusion01a
2070
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2071
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2072
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2073
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2074
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2075
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2076
+ end
2077
+ class ModuleCluster::MockClusterClassCascadesInclusion01aClassExtends
2078
+ eigenclass = class << self ; self ; end
2079
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2080
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2081
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2082
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2083
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2084
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2085
+ extend ModuleCluster::MockClusterClassCascadesInclusion01a
2086
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == true
2087
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == true
2088
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == false
2089
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock1 ).should == false
2090
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock2 ).should == false
2091
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion01::Mock3 ).should == true
2092
+ end
2093
+ module ModuleCluster::MockClusterClassCascadesInclusion02
2094
+ extend ModuleCluster
2095
+ module Mock1
2096
+ end
2097
+ module Mock2
2098
+ end
2099
+ module Mock3
2100
+ end
2101
+ define_module_cluster_cascades_to_class do |includes, extends|
2102
+ includes.concat [ Mock1, Mock2 ]
2103
+ end
2104
+ end
2105
+ class ModuleCluster::MockClusterClassCascadesInclusion02Includes
2106
+ eigenclass = class << self ; self ; end
2107
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2108
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2109
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2110
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2111
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2112
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2113
+ include ModuleCluster::MockClusterClassCascadesInclusion02
2114
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2115
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2116
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2117
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2118
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2119
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2120
+ end
2121
+ class ModuleCluster::MockClusterClassCascadesInclusion02Extends
2122
+ eigenclass = class << self ; self ; end
2123
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2124
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2125
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2126
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2127
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2128
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2129
+ extend ModuleCluster::MockClusterClassCascadesInclusion02
2130
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2131
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2132
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2133
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2134
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2135
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2136
+ end
2137
+ module ModuleCluster::MockClusterClassCascadesInclusion02a
2138
+ eigenclass = class << self ; self ; end
2139
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2140
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2141
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2142
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2143
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2144
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2145
+ include ModuleCluster::MockClusterClassCascadesInclusion02
2146
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2147
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2148
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2149
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2150
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2151
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2152
+ end
2153
+ class ModuleCluster::MockClusterClassCascadesInclusion02aClassIncludes
2154
+ eigenclass = class << self ; self ; end
2155
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2156
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2157
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2158
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2159
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2160
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2161
+ include ModuleCluster::MockClusterClassCascadesInclusion02a
2162
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2163
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2164
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2165
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2166
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2167
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2168
+ end
2169
+ class ModuleCluster::MockClusterClassCascadesInclusion02aClassExtends
2170
+ eigenclass = class << self ; self ; end
2171
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2172
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2173
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2174
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2175
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2176
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2177
+ extend ModuleCluster::MockClusterClassCascadesInclusion02a
2178
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == true
2179
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == true
2180
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2181
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock1 ).should == false
2182
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock2 ).should == false
2183
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion02::Mock3 ).should == false
2184
+ end
2185
+ module ModuleCluster::MockClusterClassCascadesInclusion03
2186
+ extend ModuleCluster
2187
+ module Mock1
2188
+ end
2189
+ module Mock2
2190
+ end
2191
+ module Mock3
2192
+ end
2193
+ define_module_cluster_cascades_to_class do |includes, extends|
2194
+ extends.concat [ Mock3 ]
2195
+ end
2196
+ end
2197
+ class ModuleCluster::MockClusterClassCascadesInclusion03ClassIncludes
2198
+ eigenclass = class << self ; self ; end
2199
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2200
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2201
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2202
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2203
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2204
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2205
+ include ModuleCluster::MockClusterClassCascadesInclusion03
2206
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2207
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2208
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2209
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2210
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2211
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2212
+ end
2213
+ class ModuleCluster::MockClusterClassCascadesInclusion03ClassExtends
2214
+ eigenclass = class << self ; self ; end
2215
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2216
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2217
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2218
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2219
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2220
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2221
+ extend ModuleCluster::MockClusterClassCascadesInclusion03
2222
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2223
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2224
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2225
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2226
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2227
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2228
+ end
2229
+ module ModuleCluster::MockClusterClassCascadesInclusion03a
2230
+ eigenclass = class << self ; self ; end
2231
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2232
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2233
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2234
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2235
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2236
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2237
+ include ModuleCluster::MockClusterClassCascadesInclusion03
2238
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2239
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2240
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2241
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2242
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2243
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2244
+ end
2245
+ class ModuleCluster::MockClusterClassCascadesInclusion03aClassInclude
2246
+ eigenclass = class << self ; self ; end
2247
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2248
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2249
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2250
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2251
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2252
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2253
+ include ModuleCluster::MockClusterClassCascadesInclusion03a
2254
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2255
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2256
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2257
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2258
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2259
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2260
+ end
2261
+ class ModuleCluster::MockClusterClassCascadesInclusion03aClassExtends
2262
+ eigenclass = class << self ; self ; end
2263
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2264
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2265
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2266
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2267
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2268
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2269
+ extend ModuleCluster::MockClusterClassCascadesInclusion03a
2270
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2271
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2272
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == false
2273
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock1 ).should == false
2274
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock2 ).should == false
2275
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesInclusion03::Mock3 ).should == true
2276
+ end
2277
+ module ModuleCluster::MockClusterClassCascadesExtension01
2278
+ extend ModuleCluster
2279
+ module Mock1
2280
+ end
2281
+ module Mock2
2282
+ end
2283
+ module Mock3
2284
+ end
2285
+ define_module_cluster_cascades_to_class do |includes, extends|
2286
+ includes.concat [ Mock1, Mock2 ]
2287
+ extends.concat [ Mock3 ]
2288
+ end
2289
+ end
2290
+ class ModuleCluster::MockClusterClassCascadesExtension01ClassIncludes
2291
+ eigenclass = class << self ; self ; end
2292
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2293
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2294
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2295
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2296
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2297
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2298
+ include ModuleCluster::MockClusterClassCascadesExtension01
2299
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2300
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2301
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2302
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2303
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2304
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2305
+ end
2306
+ class ModuleCluster::MockClusterClassCascadesExtension01ClassExtends
2307
+ eigenclass = class << self ; self ; end
2308
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2309
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2310
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2311
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2312
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2313
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2314
+ extend ModuleCluster::MockClusterClassCascadesExtension01
2315
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2316
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2317
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2318
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2319
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2320
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2321
+ end
2322
+ module ModuleCluster::MockClusterClassCascadesExtension01a
2323
+ eigenclass = class << self ; self ; end
2324
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2325
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2326
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2327
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2328
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2329
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2330
+ extend ModuleCluster::MockClusterClassCascadesExtension01
2331
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2332
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2333
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2334
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2335
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2336
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2337
+ end
2338
+ class ModuleCluster::MockClusterClassCascadesExtension01aClassIncludes
2339
+ eigenclass = class << self ; self ; end
2340
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2341
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2342
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2343
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2344
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2345
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2346
+ include ModuleCluster::MockClusterClassCascadesExtension01a
2347
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2348
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2349
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2350
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2351
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2352
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2353
+ end
2354
+ class ModuleCluster::MockClusterClassCascadesExtension01aClassExtends
2355
+ eigenclass = class << self ; self ; end
2356
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2357
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2358
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2359
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2360
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2361
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2362
+ extend ModuleCluster::MockClusterClassCascadesExtension01a
2363
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == true
2364
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == true
2365
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == false
2366
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock1 ).should == false
2367
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock2 ).should == false
2368
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension01::Mock3 ).should == true
2369
+ end
2370
+ module ModuleCluster::MockClusterClassCascadesExtension02
2371
+ extend ModuleCluster
2372
+ module Mock1
2373
+ end
2374
+ module Mock2
2375
+ end
2376
+ module Mock3
2377
+ end
2378
+ define_module_cluster_cascades_to_class do |includes, extends|
2379
+ includes.concat [ Mock1, Mock2 ]
2380
+ end
2381
+ end
2382
+ class ModuleCluster::MockClusterClassCascadesExtension02ClassIncludes
2383
+ eigenclass = class << self ; self ; end
2384
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2385
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2386
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2387
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2388
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2389
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2390
+ include ModuleCluster::MockClusterClassCascadesExtension02
2391
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2392
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2393
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2394
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2395
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2396
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2397
+ end
2398
+ class ModuleCluster::MockClusterClassCascadesExtension02ClassExtends
2399
+ eigenclass = class << self ; self ; end
2400
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2401
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2402
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2403
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2404
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2405
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2406
+ extend ModuleCluster::MockClusterClassCascadesExtension02
2407
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2408
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2409
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2410
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2411
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2412
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2413
+ end
2414
+ module ModuleCluster::MockClusterClassCascadesExtension02a
2415
+ eigenclass = class << self ; self ; end
2416
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2417
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2418
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2419
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2420
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2421
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2422
+ extend ModuleCluster::MockClusterClassCascadesExtension02
2423
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2424
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2425
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2426
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2427
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2428
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2429
+ end
2430
+ class ModuleCluster::MockClusterClassCascadesExtension02aClassIncludes
2431
+ eigenclass = class << self ; self ; end
2432
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2433
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2434
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2435
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2436
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2437
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2438
+ include ModuleCluster::MockClusterClassCascadesExtension02a
2439
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2440
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2441
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2442
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2443
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2444
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2445
+ end
2446
+ class ModuleCluster::MockClusterClassCascadesExtension02aClassExtends
2447
+ eigenclass = class << self ; self ; end
2448
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2449
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2450
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2451
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2452
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2453
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2454
+ extend ModuleCluster::MockClusterClassCascadesExtension02a
2455
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == true
2456
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == true
2457
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2458
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock1 ).should == false
2459
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock2 ).should == false
2460
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension02::Mock3 ).should == false
2461
+ end
2462
+ module ModuleCluster::MockClusterClassCascadesExtension03
2463
+ extend ModuleCluster
2464
+ module Mock1
2465
+ end
2466
+ module Mock2
2467
+ end
2468
+ module Mock3
2469
+ end
2470
+ define_module_cluster_cascades_to_class do |includes, extends|
2471
+ extends.concat [ Mock3 ]
2472
+ end
2473
+ end
2474
+ class ModuleCluster::MockClusterClassCascadesExtension03ClassIncludes
2475
+ eigenclass = class << self ; self ; end
2476
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2477
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2478
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2479
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2480
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2481
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2482
+ include ModuleCluster::MockClusterClassCascadesExtension03
2483
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2484
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2485
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2486
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2487
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2488
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2489
+ end
2490
+ class ModuleCluster::MockClusterClassCascadesExtension03ClassExtends
2491
+ eigenclass = class << self ; self ; end
2492
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2493
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2494
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2495
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2496
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2497
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2498
+ extend ModuleCluster::MockClusterClassCascadesExtension03
2499
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2500
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2501
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2502
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2503
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2504
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2505
+ end
2506
+ module ModuleCluster::MockClusterClassCascadesExtension03a
2507
+ eigenclass = class << self ; self ; end
2508
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2509
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2510
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2511
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2512
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2513
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2514
+ extend ModuleCluster::MockClusterClassCascadesExtension03
2515
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2516
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2517
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2518
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2519
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2520
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2521
+ end
2522
+ class ModuleCluster::MockClusterClassCascadesExtension03aClassIncludes
2523
+ eigenclass = class << self ; self ; end
2524
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2525
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2526
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2527
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2528
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2529
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2530
+ include ModuleCluster::MockClusterClassCascadesExtension03a
2531
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2532
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2533
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2534
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2535
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2536
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2537
+ end
2538
+ class ModuleCluster::MockClusterClassCascadesExtension03aClassExtends
2539
+ eigenclass = class << self ; self ; end
2540
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2541
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2542
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2543
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2544
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2545
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2546
+ extend ModuleCluster::MockClusterClassCascadesExtension03a
2547
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2548
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2549
+ ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == false
2550
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock1 ).should == false
2551
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock2 ).should == false
2552
+ eigenclass.ancestors.include?( ModuleCluster::MockClusterClassCascadesExtension03::Mock3 ).should == true
2553
+ end
2554
+ end
2555
+
283
2556
  end