Sha256: e7b0302deae3ca9f0359cc0a7cfe111f2c74f4fb0aab26a25db6c2df0400cbd2

Contents?: true

Size: 435 Bytes

Versions: 11

Compression:

Stored size: 435 Bytes

Contents

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/string/test_modulize.rb
facets-2.8.3 test/core/string/test_modulize.rb
facets-2.8.2 test/core/string/test_modulize.rb
facets-2.8.1 test/core/string/test_modulize.rb
facets-2.8.0 test/core/string/test_modulize.rb
facets-2.7.0 test/core/string/test_modulize.rb
facets-2.6.0 test/core/string/test_modulize.rb
facets-2.4.5 test/core/string/test_modulize.rb
facets-2.5.1 test/core/string/test_modulize.rb
facets-2.5.0 test/core/string/test_modulize.rb
facets-2.5.2 test/core/string/test_modulize.rb