You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!`, 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
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
Describe the solution you'd like
Remove
infer_spec_type_from_location!
fromrspec-rails/lib/generators/rspec/install/templates/spec/rails_helper.rb
Line 83 in 124cbcb
It is described as the old behavior.
rspec-rails/Changelog.md
Line 779 in 124cbcb
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 generatorsrspec-rails/lib/generators/rspec/model/templates/model_spec.rb
Line 4 in 124cbcb
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: