Skip to content

Commit 85b40c5

Browse files
committed
Box: fix the class name in tests
1 parent 5f09e1f commit 85b40c5

File tree

12 files changed

+321
-325
lines changed

12 files changed

+321
-325
lines changed

spec/ruby/core/module/ancestors_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
ModuleSpecs.ancestors.should == [ModuleSpecs]
88
ModuleSpecs::Basic.ancestors.should == [ModuleSpecs::Basic]
99
ModuleSpecs::Super.ancestors.should == [ModuleSpecs::Super, ModuleSpecs::Basic]
10-
if defined?(Namespace) && Namespace.enabled?
10+
if defined?(Ruby::Box) && Ruby::Box.enabled?
1111
ModuleSpecs.without_test_modules(ModuleSpecs::Parent.ancestors).should ==
12-
[ModuleSpecs::Parent, Object, Namespace::Loader, Kernel, BasicObject]
12+
[ModuleSpecs::Parent, Object, Ruby::Box::Loader, Kernel, BasicObject]
1313
ModuleSpecs.without_test_modules(ModuleSpecs::Child.ancestors).should ==
14-
[ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Namespace::Loader, Kernel, BasicObject]
14+
[ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Ruby::Box::Loader, Kernel, BasicObject]
1515
else
1616
ModuleSpecs.without_test_modules(ModuleSpecs::Parent.ancestors).should ==
1717
[ModuleSpecs::Parent, Object, Kernel, BasicObject]

test/ruby/box/a.1_1_0.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# frozen_string_literal: true
22

3-
class NS_A
3+
class BOX_A
44
VERSION = "1.1.0"
55

66
def yay
77
"yay #{VERSION}"
88
end
99
end
1010

11-
module NS_B
11+
module BOX_B
1212
VERSION = "1.1.0"
1313

1414
def self.yay

test/ruby/box/a.1_2_0.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# frozen_string_literal: true
22

3-
class NS_A
3+
class BOX_A
44
VERSION = "1.2.0"
55

66
def yay
77
"yay #{VERSION}"
88
end
99
end
1010

11-
module NS_B
11+
module BOX_B
1212
VERSION = "1.2.0"
1313

1414
def self.yay

test/ruby/box/a.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
class NS_A
1+
class BOX_A
22
FOO = "foo_a1"
33

44
def yay
55
"yay_a1"
66
end
77
end
88

9-
module NS_B
9+
module BOX_B
1010
BAR = "bar_b1"
1111

1212
def self.yay

test/ruby/box/autoloading.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
autoload :NS_A, File.join(__dir__, 'a.1_1_0')
4-
NS_A.new.yay
3+
autoload :BOX_A, File.join(__dir__, 'a.1_1_0')
4+
BOX_A.new.yay
55

6-
module NS_B
6+
module BOX_B
77
autoload :BAR, File.join(__dir__, 'a')
88
end

test/ruby/box/box.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
BOX1 = Ruby::Box.new
4+
BOX1.require_relative('a.1_1_0')
5+
6+
def yay
7+
BOX1::BOX_B::yay
8+
end
9+
10+
yay

test/ruby/box/consts.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
$VERBOSE = nil
12
class String
23
STR_CONST1 = 111
34
STR_CONST2 = 222

test/ruby/box/current.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/ruby/box/global_vars.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ def self.write(char)
2020

2121
module UniqueGvar
2222
def self.read
23-
$used_only_in_ns
23+
$used_only_in_box
2424
end
2525

2626
def self.write(val)
27-
$used_only_in_ns = val
27+
$used_only_in_box = val
2828
end
2929

3030
def self.write_only(val)
31-
$write_only_var_in_ns = val
31+
$write_only_var_in_box = val
3232
end
3333

34-
def self.gvars_in_ns
34+
def self.gvars_in_box
3535
global_variables
3636
end
3737
end

test/ruby/box/ns.rb

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)