From 6787ccf23837c50e51cb82813bb713fda052131e Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 28 Feb 2020 17:57:45 +0900 Subject: setup Other class. Some tests need to setup Other class with OtherSetup proc. --- test/ruby/test_module.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/test_module.rb') 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)} -- cgit v1.2.3