RSpecでtype指定を不要にする
RSpec
の
infer_spec_type_from_file_location!
optionを使う
https://relishapp.com/rspec/rspec-rails/docs/directory-structure
で規定されている通りにディレクトリ構成を作れば自動で推論してくれる
code:spec/rails_helper.rb
RSpec.configure do |config|
config.infer_spec_type_from_file_location!
end
https://r7kamura.com/articles/2020-09-20-rspec-type-metadata