/vendor/gems/facets-2.4.5/test/core/string/test_modulize.rb
Ruby | 25 lines | 19 code | 6 blank | 0 comment | 0 complexity | 8cbc374ba871015db00b2a6079754331 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/string/modulize'
- require 'test/unit'
- class TC_String_Modulize < Test::Unit::TestCase
- def test_modulize_snakecase
- a = "foo_bar"
- r = "FooBar"
- assert_equal(r, a.modulize)
- end
- def test_modulize_pathname
- a = "foo/bar"
- r = "Foo::Bar"
- assert_equal(r, a.modulize)
- end
- def test_modulize_on_methodized_string
- a = "foo__bar"
- r = "Foo::Bar"
- assert_equal(r, a.modulize)
- end
- end