Sha256: ff8d7c73525f978a24beba353e34613d2369fc9e4586b18404d49141e791ffad

Contents?: true

Size: 364 Bytes

Versions: 5

Compression:

Stored size: 364 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class UnderscoreTest < Minitest::Test
  test "replaces capital letters by underscores" do
    assert_equal "some_constant_name", Aitch::Utils.underscore("SomeConstantName")
  end

  test "considers URI acronym" do
    assert_equal "request_uri_too_long", Aitch::Utils.underscore("RequestURITooLong")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aitch-2.0.0 test/aitch/utils/underscore_test.rb
aitch-1.2.2 test/aitch/utils/underscore_test.rb
aitch-1.2.1 test/aitch/utils/underscore_test.rb
aitch-1.2.0 test/aitch/utils/underscore_test.rb
aitch-1.1.0 test/aitch/utils/underscore_test.rb