We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
app/services/モデル名(単数形)/機能名(単数形)_service.rb
spec/services/モデル名(単数形)/機能名(単数形)_service_spec.rb
type: :service
spec/services/user/stock_service_spec.rb
RSpec.describe "User::StockService", type: :service do
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Userモデルが太くなってしまっているので、サービス層を利用して細くする
規則
サービス層へ切り出す基準
ファイル作成方法
app/services/モデル名(単数形)/機能名(単数形)_service.rb
というファイルに切り出すサービス層の単体テスト作成方法
spec/services/モデル名(単数形)/機能名(単数形)_service_spec.rb
というファイルに書くtype: :service
とするspec/services/user/stock_service_spec.rb
の場合RSpec.describe "User::StockService", type: :service do
The text was updated successfully, but these errors were encountered: