Skip to content

Commit 9c2eb1c

Browse files
committed
Add CLI inflection and verify Zeitwerk loading
1 parent 28bc301 commit 9c2eb1c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

config/initializers/inflections.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# inflect.uncountable %w( fish sheep )
1111
# end
1212

13-
# These inflection rules are supported but not enabled by default:
14-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
15-
# inflect.acronym "RESTful"
16-
# end
13+
ActiveSupport::Inflector.inflections(:en) do |inflect|
14+
inflect.acronym "CLI"
15+
end

spec/rails/zeitwerk_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require "rails_helper"
2+
3+
RSpec.describe "Zeitwerk" do
4+
it "eager loads all files without errors" do
5+
expect { Rails.autoloaders.main.eager_load(force: true) }.not_to raise_error
6+
end
7+
end

0 commit comments

Comments
 (0)