blob: d6ea595ae2bc3665b19422f1cd8b608ad33cf93f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/class'
require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/module'
module One
end
class Ab
include One
end
module Xy
class Bc
include One
end
end
module Yz
module Zy
class Cd
include One
end
end
end
class De
end
class ModuleTest < Test::Unit::TestCase
def test_included_in_classes
assert One.included_in_classes.include?(Ab)
assert One.included_in_classes.include?(Xy::Bc)
assert One.included_in_classes.include?(Yz::Zy::Cd)
assert !One.included_in_classes.include?(De)
end
end
|