-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Is your feature request related to a problem? Please describe.
Be consistent. Don't make infer spec types the default, and then also generate the types in the spec files. Also don't describe it as opt-in, when it is on by default.
rubocop-rails has a cop that helps with this inconsistency and removes the types in the spec files
After setting up rspec-rails, you will have enabled config.infer_spec_type_from_file_location! by default in spec/rails_helper.rb. This cop works in conjunction with this config.
Describe the solution you'd like
Remove infer_spec_type_from_location!
from
config.infer_spec_type_from_file_location! |
It is described as the old behavior.
Line 779 in 124cbcb
`config.infer_spec_type_from_file_location!`, which is still supplied |
The old behaviour
But it is not very old or opt-in, because it is still enabled by default in the generator.
This PR describes it as "truly opt-in".
But, for that to be true, infer_spec_type_from_location!
would have to be commented out or removed in the generator.
Describe alternatives you've considered
Make it configurable whether type:
is generated by the spec generators
RSpec.describe <%= class_name %>, <%= type_metatag(:model) %> do |
Additional context
Add any other context or screenshots about the feature request here.