/vendor/gems/facets-2.4.5/test/core/string/test_modulize.rb
https://bitbucket.org/mediashelf/fedora-migrator · Ruby · 25 lines · 19 code · 6 blank · 0 comment · 0 complexity · 8cbc374ba871015db00b2a6079754331 MD5 · raw file
- 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