Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSpec/FilePath does not respect Rails Inflectors #1306

Closed
cdhagmann opened this issue Jun 28, 2022 · 1 comment
Closed

RSpec/FilePath does not respect Rails Inflectors #1306

cdhagmann opened this issue Jun 28, 2022 · 1 comment

Comments

@cdhagmann
Copy link

config/initializers/inflections.rb
ActiveSupport::Inflector.inflections(:en) do |inflect|
  inflect.acronym 'StarLIMS'
end
app/services/row_importers/starlims_row.rb
module RowImporters
  class StarLIMSRow
  end
end
spec/services/row_importers/starlims_row_spec.rb
RSpec.describe RowImporters::StarLIMSRow do
end
$ bundle exec rubocop
Inspecting 259 files
.......................................................................................................................................................................................................................................C........

Offenses:

spec/services/row_importers/starlims_row_spec.rb:5:1: C: RSpec/FilePath: Spec path should end with row_importers/star_lims_row*_spec.rb.
RSpec.describe RowImporters::StarLIMSRow do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the code in question.

custom_transform.fetch(name) { camel_to_snake_case(name) }

@pirj
Copy link
Member

pirj commented Jun 28, 2022

Thanks for reporting. There's an open PR. You are welcome to join the discussion, as it turns out not to be so trivial to implement.

@pirj pirj closed this as completed Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants