File: test_null_inflector.rb

package info (click to toggle)
ruby-zeitwerk 2.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 732 kB
  • sloc: ruby: 6,240; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require "test_helper"

class TestNullInflector < Minitest::Test
  def camelize(str)
    Zeitwerk::NullInflector.new.camelize(str, nil)
  end

  test "does not change the basename" do
    assert_equal "user", camelize("user")
  end

  test "preserves case (camel case)" do
    assert_equal "UsersController", camelize("UsersController")
  end

  test "preserves case (acronym)" do
    assert_equal "HTMLTag", camelize("HTMLTag")
  end
end