Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
RORのテストケースを書いています。1 つのモデル/コントローラーをテストするためのコードが多すぎます。同じモデル/コントローラーをテストするために、ファイルを別のファイルに分割する方法はありますか。
テストに rspec を使用している場合は、同じクラスを記述する複数のファイルを追加するだけです。spec/ディレクトリに一致するサブディレクトリを作成し、そこにすべての仕様ファイルを配置するのが合理的かもしれません。
spec/