Sha256: 0ae881fcf5c4ab5dc872fa9d15489d8bf6846f419ee9fa7162b2cfa6cfb0bbf0

Contents?: true

Size: 752 Bytes

Versions: 3

Compression:

Stored size: 752 Bytes

Contents

require 'test/unit'
require 'absolute_renamer/libs/string'

class TC_StringTest < Test::Unit::TestCase
    def test_simple_camelize
        assert_equal("Hello World", "hello world".camelize)
        assert_equal("Hello.World", "hello.world".camelize)
        
        assert_equal("Hello The.World", "hello THE.world".camelize)
        
        assert_equal("Hello..World", "hello..world".camelize)
    end
    
    def test_parametred_camelize
        assert_equal("Hello.World", "hello.world".camelize(/\./))
        assert_equal("Hello The.world", "hello THE.world".camelize(/ /))
    end
    
    def test_camelize!
        str = "hello world"
        assert_equal("Hello World", str.camelize!)
        assert_equal("Hello World", str)
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
AbsoluteRenamer-0.9.0 test/unit/tc_string.rb
AbsoluteRenamer-0.9.0.1 test/unit/tc_string.rb
AbsoluteRenamer-0.9.0.2 test/unit/tc_string.rb