PageRenderTime 45ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/kernel/test_constant.rb

https://bitbucket.org/mediashelf/fedora-migrator
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
  1. require 'facets/kernel/constant.rb'
  2. require 'test/unit'
  3. class TCKernel < Test::Unit::TestCase
  4. def test_constant
  5. c = ::Test::Unit::TestCase.name
  6. assert_equal( ::Test::Unit::TestCase, constant(c) )
  7. c = "Test::Unit::TestCase"
  8. assert_equal( ::Test::Unit::TestCase, constant(c) )
  9. c = "Unit::TestCase"
  10. assert_equal( ::Test::Unit::TestCase, Test.constant(c) )
  11. c = "TestCase"
  12. assert_equal( ::Test::Unit::TestCase, Test::Unit.constant(c) )
  13. end
  14. end