Skip to content

Commit b09cc7c

Browse files
tagomorisandrykonchin
authored andcommitted
namespace on read
1 parent 2acb1a6 commit b09cc7c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

core/module/ancestors_spec.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@
77
ModuleSpecs.ancestors.should == [ModuleSpecs]
88
ModuleSpecs::Basic.ancestors.should == [ModuleSpecs::Basic]
99
ModuleSpecs::Super.ancestors.should == [ModuleSpecs::Super, ModuleSpecs::Basic]
10-
ModuleSpecs.without_test_modules(ModuleSpecs::Parent.ancestors).should ==
11-
[ModuleSpecs::Parent, Object, Kernel, BasicObject]
12-
ModuleSpecs.without_test_modules(ModuleSpecs::Child.ancestors).should ==
13-
[ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Kernel, BasicObject]
10+
if Namespace.enabled?
11+
ModuleSpecs.without_test_modules(ModuleSpecs::Parent.ancestors).should ==
12+
[ModuleSpecs::Parent, Object, Namespace::Loader, Kernel, BasicObject]
13+
ModuleSpecs.without_test_modules(ModuleSpecs::Child.ancestors).should ==
14+
[ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Namespace::Loader, Kernel, BasicObject]
15+
else
16+
ModuleSpecs.without_test_modules(ModuleSpecs::Parent.ancestors).should ==
17+
[ModuleSpecs::Parent, Object, Kernel, BasicObject]
18+
ModuleSpecs.without_test_modules(ModuleSpecs::Child.ancestors).should ==
19+
[ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Kernel, BasicObject]
20+
end
1421
end
1522

1623
it "returns only modules and classes" do

0 commit comments

Comments
 (0)