/vendor/gems/facets-2.4.5/test/core/string/test_methodize.rb
Ruby | 25 lines | 19 code | 6 blank | 0 comment | 0 complexity | e0ede5e443068ded2d4fec4d3c46a74f MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/string/methodize'
- require 'test/unit'
- class TC_String_Methodize < Test::Unit::TestCase
- def test_methodize_modulename
- a = "FooBase"
- r = "foo_base"
- assert_equal(r, a.methodize)
- end
- def test_methodize_pathname
- a = "foo/base"
- r = "foo__base"
- assert_equal(r, a.methodize)
- end
- def test_methodize_namespace
- a = "Foo::Base"
- r = "foo__base"
- assert_equal(r, a.methodize)
- end
- end