/vendor/gems/facets-2.4.5/test/core/kernel/test_constant.rb
Ruby | 18 lines | 14 code | 4 blank | 0 comment | 0 complexity | ec9c6dd193d5ad9eb84a27109495068a MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/kernel/constant.rb'
- require 'test/unit'
- class TCKernel < Test::Unit::TestCase
- def test_constant
- c = ::Test::Unit::TestCase.name
- assert_equal( ::Test::Unit::TestCase, constant(c) )
- c = "Test::Unit::TestCase"
- assert_equal( ::Test::Unit::TestCase, constant(c) )
- c = "Unit::TestCase"
- assert_equal( ::Test::Unit::TestCase, Test.constant(c) )
- c = "TestCase"
- assert_equal( ::Test::Unit::TestCase, Test::Unit.constant(c) )
- end
- end