Sha256: ff85c547ae946980a491d73c43c3ddf84e785532a7461827fa5a328d0b0109b9

Contents?: true

Size: 791 Bytes

Versions: 169

Compression:

Stored size: 791 Bytes

Contents

require 'test_helper'
require 'tins/xt'

module Tins
  class StringCamelizeTest < Test::Unit::TestCase
    def test_camelize
      assert_equal 'FooBar', 'foo_bar'.camelize
      assert_equal 'FooBar', 'foo_bar'.camelize(:upper)
      assert_equal 'FooBar', 'foo_bar'.camelize(true)
      assert_equal 'fooBar', 'foo_bar'.camelize(:lower)
      assert_equal 'fooBar', 'foo_bar'.camelize(false)
      assert_equal 'FooBar', 'foo_bar'.camelcase
      assert_equal 'Foo::Bar', 'foo/bar'.camelize
      assert_equal 'Foo::Bar', 'foo/bar'.camelize(:upper)
      assert_equal 'Foo::Bar', 'foo/bar'.camelize(true)
      assert_equal 'foo::Bar', 'foo/bar'.camelize(:lower)
      assert_equal 'foo::Bar', 'foo/bar'.camelize(false)
      assert_equal 'Foo::Bar', 'foo/bar'.camelcase
    end
  end
end

Version data entries

169 entries across 151 versions & 9 rubygems

Version Path
tins-1.37.0 tests/string_camelize_test.rb
tins-1.36.1 tests/string_camelize_test.rb
tins-1.36.0 tests/string_camelize_test.rb
tins-1.35.0 tests/string_camelize_test.rb
tins-1.34.0 tests/string_camelize_test.rb
tins-1.33.0 tests/string_camelize_test.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/string_camelize_test.rb
tins-1.32.1 tests/string_camelize_test.rb
tins-1.32.0 tests/string_camelize_test.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/string_camelize_test.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/string_camelize_test.rb
tins-1.31.1 tests/string_camelize_test.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/tins-1.31.0/tests/string_camelize_test.rb
tins-1.31.0 tests/string_camelize_test.rb
tins-1.30.0 tests/string_camelize_test.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/string_camelize_test.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/string_camelize_test.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/string_camelize_test.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/string_camelize_test.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tins-1.26.0/tests/string_camelize_test.rb