diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-02-28 17:57:45 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-02-28 17:58:30 +0900 |
commit | 6787ccf23837c50e51cb82813bb713fda052131e (patch) | |
tree | 6b89ad1b1320f80dce70d3027f040d46e9d4da37 | |
parent | 28399e4e0f8036b03d7e626b0071de0f59ac7bc0 (diff) | |
download | ruby-6787ccf23837c50e51cb82813bb713fda052131e.tar.gz |
setup Other class.
Some tests need to setup Other class with OtherSetup proc.
-rw-r--r-- | test/ruby/test_module.rb | 6 |
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)} |