summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-02-28 17:57:45 +0900
committerKoichi Sasada <ko1@atdot.net>2020-02-28 17:58:30 +0900
commit6787ccf23837c50e51cb82813bb713fda052131e (patch)
tree6b89ad1b1320f80dce70d3027f040d46e9d4da37 /test/ruby/test_module.rb
parent28399e4e0f8036b03d7e626b0071de0f59ac7bc0 (diff)
setup Other class.
Some tests need to setup Other class with OtherSetup proc.
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index cafb0cd753..e5586edc6d 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -302,6 +302,8 @@ class TestModule < Test::Unit::TestCase
end
def test_nested_get
+ OtherSetup.call
+
assert_equal Other, Object.const_get([self.class, 'Other'].join('::'))
assert_equal User::USER, self.class.const_get([User, 'USER'].join('::'))
assert_raise(NameError) {
@@ -310,6 +312,8 @@ class TestModule < Test::Unit::TestCase
end
def test_nested_get_symbol
+ OtherSetup.call
+
const = [self.class, Other].join('::').to_sym
assert_raise(NameError) {Object.const_get(const)}
@@ -345,6 +349,8 @@ class TestModule < Test::Unit::TestCase
end
def test_nested_defined_symbol
+ OtherSetup.call
+
const = [self.class, Other].join('::').to_sym
assert_raise(NameError) {Object.const_defined?(const)}