Sha256: 10eec888f760fb0d57f38aca7a775b742362e34bd9ec5af71e3953fd5b6ec14a

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/string/camelcase.rb
#
# Extracted Tue Jun 20 15:12:27 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/string/camelcase.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def test_camelcase
      assert_equal( "abcXyz", "abc_xyz".camelcase )
      assert_equal( "abcXyz", "abc xyz".camelcase )
      assert_equal( "abcXyz", "abc  xyz".camelcase )
      assert_equal( "abcXyz", "abc\txyz".camelcase )
      assert_equal( "abcXyz", "abc\nxyz".camelcase )
      assert_equal( "abcXyz", "abc____xyz".camelcase )
    end

    def test_camelcase_true
      assert_equal( "AbcXyz", "abc_xyz".camelcase(true) )
      assert_equal( "AbcXyz", "abc xyz".camelcase(true) )
      assert_equal( "AbcXyz", "abc  xyz".camelcase(true) )
      assert_equal( "AbcXyz", "abc\txyz".camelcase(true) )
      assert_equal( "AbcXyz", "abc\nxyz".camelcase(true) )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.4.2 test/lib/facets/core/string/test_camelcase.rb