/vendor/gems/facets-2.4.5/test/core/module/test_nesting.rb
Ruby | 21 lines | 16 code | 5 blank | 0 comment | 0 complexity | e7485ec4ac76f2a5f60ba77546c7d51d MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/module/nesting.rb'
- require 'test/unit'
- class TestModuleNesting < Test::Unit::TestCase
- module M
- module N
- class C
- def n
- self.class.nesting
- end
- end
- end
- end
- def test_nesting
- assert_equal( [TestModuleNesting, M, M::N, M::N::C], M::N::C.new.n )
- end
- end